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


LIST explode(STRING str[, STRING sep[, INTEGER want-blanks]])

This function breaks string into a list of strings, using the string sep as the delimiter. If sep is unspecified it uses spaces as the delimiter. If want-blanks is specified and is true explode() will include zero-length strings in the final list, otherwise it will not. The function split() is similar, but uses a regular expression as the delimiter. Examples:

explode(" foo bar baz")
=> ["foo", "bar", "baz"]
explode("foo:bar::baz", ":")
=> ["foo", "bar", "baz"]
explode("foo:bar::baz", ":", 1)
=> ["foo", "bar", "", "baz"]


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