Cold Help System: Programming: ColdC Reference Manual: Functions: String: split()


LIST split(STRING str, STRING regexp[, INTEGER regexp-args])

This function breaks string into a list of strings, using the second argument regexp (a regular expression) as a delimiter. The third argument is optional, and is a string containing character flags which can change the behaviour of split(). Flags can be any:

b Keep blank entries (default is to ignore)
c Case sensitive match
i Case insensitive match (default)

Examples:

split(" foo bar baz", " +")
=> ["foo", "bar", "baz"]
split("foo:bar::baz", ":", "b")
=> ["foo", "bar", "", "baz"]
split("fobibobIbidilly", "i")
=> ["fob", "bob", "b", "d", "lly"]
split("fobIbobibidIlly", "i", "cb")
=> ["fobIbob", "b", "dIlly"]


crypt() | explode() | lowercase() | match_begin() | match_pattern() | match_regexp() | match_template() | pad() | regexp() | strcmp() | strfmt() | strgraft() | strlen() | strsed() | strsub() | substr() | uppercase() | match_crypted() | split() | stridx()


the Cold Dark