split
Table of Contents
Function
split — slice a string into an array of strings
Synopsis
split(s: string, sep: string) -> [string]
Description
The split function slices string s
into all substrings separated by the
string sep
appearing in s
and returns an array of the substrings
spanning those separators.
Examples
Split a semi-colon delimited list of fruits:
yield split(this,";")
"apple;banana;pear;peach"
Loading...
Split a comma-separated list of IPs and cast the array of strings to an array of IPs:
yield cast(split(this,","),<[ip]>)
"10.0.0.1,10.0.0.2,10.0.0.3"
Loading...