Flash Lite 1.x ActionScript Language Reference |
|
|
|
| Flash Lite Global Functions > substring() | |||
Flash Lite 1.0.
substring(string,index,count)
string The string from which to extract the new string.
index The number of the first character to extract.
count The number of characters to include in the extracted string, not including the index character.
Function; extracts part of a string. This function is one-based, whereas the String class methods are zero-based.
The following example extracts the first five characters from the string "Hello World":
origString = "Hello World!"; newString = substring(origString, 0, 5); trace (newString); // Output: Hello
|
|
|
|