문제

Does string::size return the number of array elements needed to represent the string, or the number of glyphs required to render the string? Does wstring behave the same?

도움이 되었습니까?

해결책

It returns the number of char/wchar_t in the array. This allows a std::string to be encoded in utf-8 which, as a single char, may have no meaning.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top