| Did you know ... | Search Documentation: |
| char_array<-split |
separator is given, it is used to separate parts of the
text. If omitted, a non-empty sequence of layout characters is used.
Examples:
?- get_object('foo+bar', split, +, X).
X = chain(foo, bar).
?- get_object('foo bar', split, X).
X = chain(foo, bar).
Please note that -like the other get-methods on class char_array- the returned fragments are of the same class as the receiver. In other words, breaking a name object yields a chain of names and breaking a string object yields a chain of string objects.
See also regex->for_all,
which may be used to realise more complicated breaking of text.