Concatenate Elements in a String Collection

Product 25/09/2013 by Jan Petter Bergfjord

Introduced the function join for the String class in the Genus Application Framework Language.
String.join(separator, values, includeNullOrEmpty)
Concatenates all the elements of a string collection using the specified separator between each element.
Return Type
If the string collections contains no elements, the function returns an empty string.
Type: String
The string to use as a separator. The string is included in the returned string only if the collection has more than one element.
Type: Collection(String)
A collection that contains the strings to concatenate.
Type: Boolean
TRUE to include collection elements that are null or the empty string; otherwise FALSE to exclude such elements before concatenation.
Create a string containing the first, middle, and last name for a person object, where each element is separated by a space.
String.join(" ", [person.firstName, person.middleName, person.lastName], false)
Create a semicolon separated string containing registered addresses for a person object:
String.join(“;”, person.addresses.displayName, false)