PROGRAMMING COURSES ADMIN VIDEO TUTORIALS COMMUNITY RESOURCES |
If there comes a time when you need to split a string by a delimiting
character or set of characters, the ActionScript 3.0 split() method is just dandy for doing that.
Similar to the PHP explode() function in which it
creates an array containing each substring split from the original
string. We can then access the full array or indexed segments of it.
In the following example we use split() to separate using comma as a target delimiter(splitter). Anytime a comma is met in the string, that is where it will be split. ![]() var myString:String = "Jimmy,Susan,Paul,John";
Jimmy
Susan Paul John
|
|||||||||||
|
|
DevelopPHP Requires Flash Player
___________________________________________
|
||||||||