String String::SubstringUTF8(unsigned pos) const { unsigned utf8Length = LengthUTF8(); unsigned byteOffset = ByteOffsetUTF8(pos); String ret; while (pos < utf8Length) { ret.AppendUTF8(NextUTF8Char(byteOffset)); ++pos; } return ret; }
String String::SubstringUTF8(size_t pos) const { size_t utf8Length = LengthUTF8(); size_t byteOffset = ByteOffsetUTF8(pos); String ret; while (pos < utf8Length) { ret.AppendUTF8(NextUTF8Char(byteOffset)); ++pos; } return ret; }
unsigned String::AtUTF8(unsigned index) const { unsigned byteOffset = ByteOffsetUTF8(index); return NextUTF8Char(byteOffset); }
unsigned String::AtUTF8(size_t index) const { size_t byteOffset = ByteOffsetUTF8(index); return NextUTF8Char(byteOffset); }