0

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?

user877329
  • 6,717
  • 8
  • 46
  • 88

1 Answers1

0

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.

taylorc93
  • 3,676
  • 2
  • 20
  • 34
Twifty
  • 3,267
  • 1
  • 29
  • 54