I have now performed the first step in unifying the disparate text
subpackage, creating a top-level StrMatcher class.
StrMatcher is extracted from StrTokenizer and tidied up. It provides a
way of searching a character buffer for a match. Basic matchers do
nothing interesting, but user-written subclasses could.
So far, it's only used in StrBuilder, where indexOf, lastIndexOf,
contains, delete and replace all have variants that take a StrMatcher now.
The next step, unless there are objections, is to refactor StrTokenizer
to use the new StrMatcher class (rather than the old one still inside
it). Then methods can be added to StrBuilder such as split() and
tokenizer().
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|