lundi 22 juin 2015

Substring of a std::string in utf-8? C++11

I need to get a substring of the first N characters in a std::string assumed to be utf8. I learned the hard way that .substr does not work... as... expected.

Reference: My strings probably look like this: mission:\n\n1億2千万匹

Aucun commentaire:

Enregistrer un commentaire