C++ Logo

std-proposals

Advanced search

Re: [std-proposals] .first() and .last() in strings

From: Thiago Macieira <thiago_at_[hidden]>
Date: Fri, 03 May 2024 10:26:50 -0700
On Friday 3 May 2024 09:17:08 GMT-7 Jason McKesson via Std-Proposals wrote:
> That being said, many of the functions you cite require the string to
> have specific knowledge of the meaning of what it stores. `trim` needs
> to know what a "space" is; Unicode operations require knowing that the
> string is encoded in accord with Unicode and what that encoding is.
> `std::string`, due to being very old, doesn't have that information.

That's a design flaw, not a good reason (it's "a reason"). Users need the
functionality.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Principal Engineer - Intel DCAI Cloud Engineering

Received on 2024-05-03 17:26:55