|
Boost Users : |
From: Rainer Deyke (rainerd_at_[hidden])
Date: 2019-11-02 09:12:23
On 01.11.19 22:22, Zach Laine via Boost-users wrote:
> Moreover, I don't know of a great use case for a boost::text::is_alpha().
> Specifically, it seams that if you are looking for alphabetical characters,
> you are usually doing something like word-breaking, for which there is
> already an algorithm, doing a regex match, for which is_alpha() is
> insufficient, etc. I'm open to hearing about such use cases, of course.
Filtering text input. Parsing programming languages or data description
languages. Gathering statistics on a piece of text.
My own codebase has has four instances of #include <cctype> and three
instances of #include <ctype.h>, but that's an artificially low number
because character classification is trivial to do by hand for ASCII and
because cctype doesn't support Unicode. Exactly zero of these instances
can be replaced by any algorithm provided by the proposed library. All
of them could technically be replaced by regular expressions, but only
in the sense that it is possible to (inefficiently) implement the cctype
interface in terms of regular expressions.
-- Rainer Deyke (rainerd_at_[hidden])
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net