sitelogo
split/2/3

return tokens of string

split(+string, -tokens)

split(+regexp, +string, -tokens)

split/2 "tokens" return substrings of "string" seperated by white space.

split/3 "tokens" return substrings of "string" seperated by "regexp".

Arguments

	regexp              atom
	string              atom
	tokens              list

Examples

	split('one two three', L)		=>  	L = [one,two,three]
	split('%s*:%s*', 'one   :  two  :three', L)
			=>  L  = [one,two,three]

Standard

This predicate is not part of the ISO-Prolog Standard.

See also

regular expression, match/2/3, match_all/3, substitute/4, substitute_all/4, split/2/3, chop/2, get_line/1/2,


Up read on...
scroll to top managed with ubiCMS