Breaks the specified string into fragments divided by the specified delimiter and returns a Vector containing those fragments.
Parameters:
str
The string to be broken
delimiter
delimiters
The delimiter substring or an array of delimiters.In the case of multiple delimiters, the one is used at each string breaking cycle, whose position occurs the first within the rest of the string.
trimSpaces
Specifies whether the white spaces should be removed from each fragment's ends. Besides this, iftrue
, the empty fragments and those consist of only white spaces will be ignored and not included in the result Vector.If this parameter is not specified, it is assumed to be
false
.
See Also:
mergeStrings()
Examples:
(1) The following call
will produce Vector:breakString("Veni -> vidi -> vici", "->");
(2) The call{ "Veni ", " vidi ", " vici" }
will return:breakString("one, two and three", Array (",", "and"), true);
{ "one", "two", "three" }