This function splits the input string into multiple substrings. It searches the input string for the separator specified in the function, and when a separator is found, the preceding substring is identified. All substrings are returned as an array of strings.$string.split(<inStr>, <separator>)
inStrseparator The separator (one or more characters) that determines how to split the input string into substrings. The separators are not included in the returned result.
Example 109 #set($str='Species;Breed;Name;Age;Color')
#set($str2=$string.split($str, ';'))
Original string: $str
Array:
#foreach($i in $str2)
$i
#endOriginal string: Species;Breed;Name;Age;Color
Array:
Species
Breed
Name
Age
Color
| OpenText StreamServe 5.6.2 | Updated: 2018-01-26 |