Splits a string list into two lists based on a predicate. The first list contains elements matching the predicate, the second contains the rest.
Example:
var pair = Lists.partitionString (list, (s) => {
return s.has_prefix ("a");
});
// pair.first = items starting with "a"
// pair.second = all others
| list |
the source list. |
| fn |
the predicate. |
|
a Pair of (matching, non-matching) lists. |