Subject: Re: [boost] [UTF String] UTF String library 1.5 ready for perusal
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-02-13 23:03:39
On Sun, 13 Feb 2011 15:17:30 -0800
Scott McMurray <me22.ca+boost_at_[hidden]> wrote:
> On Sat, Feb 12, 2011 at 05:57, Chad Nelson
> <chad.thecomfychair_at_[hidden]> wrote:
>> What do you use string.length() for? :-) Efficiently providing an
>> answer to that is one of several things the UTF string classes keep
>> track of it for.
> Seeing if a string will "fit", under various meanings:
> * wrapping (like 80-column console lines)
> * fixed-width fields (like ID3v1)
> Neither of which are things that are applicable at codepoint level :)
I don't know what the code-point length might be needed for, though
that doesn't mean much as I haven't played with Unicode for very long.
But std::string has that capability, so anyone who wants to use the UTF
classes as std::string equivalents, or even replacements -- the target
audience for the library -- will expect it, whether they end up using
it or not.
> I've never seen anything best done at codepoint level. Comparing,
> rendering, and storing text all are done at different non-codepoint
Anything that operates at a higher level, such as glyphs or true
Unicode characters, has to operate on code-points.
-- Chad Nelson Oak Circle Software, Inc. * * *
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk