thx for replying mind if I ask substring(6,11); 6 stand for ? and the 11 stand for?
yes, sorry, I forgot to explain, the method has two parameners, start and end
substring(start, end)
the start parameter is the parameter from which the method will start getting the characters, and the end param is up to which character will get.
if you pass a nevgative value as the start param, it will start counting the start from the last position minus the negative start parameter up to the end parameter. So if you do this:
-
var myStr:String = "Hello world";
-
var mySubstr:String = myStr.substring(-5,5);
-
mySubstr will now have a value of "world". It is, in this case, the same as this:
-
var myStr:String = "Hello world";
-
var mySubstr:String = myStr.substring(6,11);
-
In both of these examples mySubstr will have a value of "world";
If there's anything you didn't understand, please let me know.
Kind regards