Creates a new string made of fragments contained in the specified vector or array
and delimited with the substring specified in the delimiter
parameter.
Parameters:
strings
An array or vector containing the fragments to be merged.The elements contained in the specified array or vector are not required to be String objects. Actually, what is taken from each element is the string returned by the call
element.toString()
.If an element is
null
, it is simply ignored.
delimiter
The delimiter substring.If this parameter is not specified, the delimiter will be empty string.
last_delimiter
When specified, this will be the delimiter used at the last delimiter position.See Also:This may be useful to form human language sentences containing enumerations. For example, the sentence:
I speak English, French, Italian and German.can be created with the following expression:"I speak " + mergeStrings ( Vector ( "English", "French", "Italian", "German" ), ", ", " and " )
breakString()
Examples:
The following expression
will return string:a = Array ("Veni", "vidi", "vici"); mergeStrings (a, " -> ");
The call"Veni -> vidi -> vici"
will return:mergeStrings (Vector (1,2,3), ",");
"1,2,3"