Link Search Menu Expand Document

split

Explanation Separates the string with a delimiter string and gets its elements.
Call format var s = split( string, delimiter string, element position )
Return value Element corresponding to the specified element position
If there is no corresponding element at the specified element position, an empty string is returned.
Arguments String string Original character string
String delimiter string String to use as a delimiter
Integer element position Position of the element to be taken out
Specify by the number where the leftmost element is 0.
Exception None
Example of use
var s = "1999/08/10";
print(split(s, "/", 0), "\n");  /* 1999 が切り出されます */
print(split(s, "/", 1), "\n");  /* 08 が切り出されます */
print(split(s, "/", 2), "\n");  /* 10 が切り出されます */
Related item