ColdC: Function/Method Reference: explode()


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

This function breaks string into a list of strings, using the string sep as delimiters. If sep is unspecified it uses spaces as delimiters. If want-blanks is specified and is true explode() will include zero-length strings in the final list, otherwise it will not.

Examples:

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

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


Last Modified on 24 Mar 1996
Copyright © 1995, 1996, Brandon Gillespie