StringTools[Group] - separate a string into groups based on a property
|
Calling Sequence
|
|
Group(p, s)
|
|
Parameters
|
|
p
|
-
|
a predicate ( Maple procedure) to apply to string s
|
s
|
-
|
string
|
|
|
|
|
Description
|
|
•
|
The Group(p,s) function returns an expression sequence of consecutive substrings of s that are maximal with respect to the individual characters satisfying, or not satisfying, the predicate p.
|
•
|
This procedure is analogous to the Group procedure in the ListTools package.
|
•
|
If the input string s is the empty string, for example, Group(IsDigit, "") then NULL is returned. See last example.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
|
|
Download Help Document
Was this information helpful?