Link Search Menu Expand Document

UString.Split Method

Explanation Divides the string by the specified characters and returns it as an array.
Call format var arr = str.Split( separator [, limit ] )
Return value String array containing each element of the split string (does not include the delimiter)
Arguments UString separator Delimiter to split a string
integer limit Maximum number to divide
If omitted, it will be split up to the end of the character string.
Exception Func-4 Invalid argument
Example of use
var str = new UString("abc-def-ghi");
var arr = str.Split("-");
for (var n = 0; n < arr.Length; n++) {
    print(arr[n], "\n");
}
    
Related item