vendredi 3 juin 2016

How to remove the last character of an UTF8 string in C++?

The text is stored in an std::string

If the text is 8bit ascii, then it is really easy:

text.pop_back();

But what if it is an UTF8 text?
As far as I know, there are no utf8 related functions in the standard library, using I could manage it.

Aucun commentaire:

Enregistrer un commentaire