C++ Logo

std-proposals

Advanced search

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

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Fri, 3 May 2024 17:20:54 +0200
Il 03/05/24 15:31, Rhidian De Wit via Std-Proposals ha scritto:
>
> I indeed proposed this because I found myself having to do this trivial
> functionality often enough where I wondered why it wasn't part of the
> /std::string/ toolset. I understand the /std::string/ API size worries
> though, but I don't see why we could add 2 small functions to it.
> However, I realize that this is the exact mindset that leads to such
> massive api's, aka "just one more function won't make a difference...".

I am completely unconvinced that std::string has a rich interface. Do we
want to compare QString, juce::String, etc. to it? Where's my replace(),
trim(), split(), string builders, Unicode conversions, ...?

Please, add as much convenience as possible for the end-user. A
minimalistic API for vocabulary classes helps the _implementors_, not
the _users_ (the 99.9999%).

My 2 c,
--
Giuseppe D'Angelo

Received on 2024-05-03 15:20:58