
4 Mar
2008
4 Mar
'08
1:05 p.m.
Phil Endecott a écrit : I've been using it for quite some time now, so here are my remarks :
- It uses size_type to pass and return positions in the string, and doesn't specify whether these are byte or character positions; I get the impression that they're character positions but I could be wrong.
It is character positions.
- It offers implicit conversion to and from std::string. Is this desirable?
In my experience, it is very bad. It is not a conversion, but a reinterpretation. Even a str() function would seem bad, unless it has a parameter that states in which encoding the resulting string is desired. A conversion from/to std::wstring would seem more useful in most cases. -- Loïc