Skip to end of banner
Go to start of banner

split

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Description

Returns the array of strings computed by splitting this string around matches of the given regular expression.

Parameters

Return Type

String[]

Examples

Example 1

return split("boo:and:foo", ":");

Returns { "boo", "and", "foo" }.

Example 2

return split("I went to the store. I bought some milk.", "\. ");
//period symbol is a special character in regex so it must be escaped

Returns { "I went to the store", "I bought some milk" }.

Example 3

return split("1:Part one2:Part two3:Part 3", "([0-9]:)");

Returns { "Part one", "Part two", "Part 3" }.

See also

  • No labels