Example #1
0
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;
}
Example #2
0
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;
}
Example #3
0
unsigned String::AtUTF8(unsigned index) const
{
    unsigned byteOffset = ByteOffsetUTF8(index);
    return NextUTF8Char(byteOffset);
}
Example #4
0
unsigned String::AtUTF8(size_t index) const
{
    size_t byteOffset = ByteOffsetUTF8(index);
    return NextUTF8Char(byteOffset);
}