C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Adding a .slice() method to std::basic_string

From: Thiago Macieira <thiago_at_[hidden]>
Date: Wed, 13 Mar 2024 14:48:05 -0700
On Wednesday, 13 March 2024 13:47:33 PDT David G. Pickett via Std-Proposals
wrote:
> Should substr() be changed to allow missing features like negative index for
> from-end?

Then you have the situation that led us to implement QString::sliced:

what does str.mid(-1, -1) return?

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

Received on 2024-03-13 21:48:09