String front, back return code point/unit
Tejas
notrealemail at gmail.com
Wed Jun 23 15:48:57 UTC 2021
On Wednesday, 23 June 2021 at 15:31:04 UTC, vit wrote:
> Hello,
>
> I am implementing @nogc string struct similar to c++
> std::basic_string (link
> https://code.dlang.org/packages/basic_string).
>
> C++ string has methods front, back and pop_back
> returning/deleting code units.
> D strings has functions (std.range) front, back and popBack
> returning/deleting code points (autodecoding?).
>
> Which behavior is better?
I think this video will be helpful:
https://www.youtube.com/watch?v=d3qY4dZ2r4w
There was also a discussion about this in the group:
https://forum.dlang.org/thread/diexjstekiyzgxlicnts@forum.dlang.org
More information about the Digitalmars-d-learn
mailing list