toUCSindex

fnsize_t toUCSindex(const scope char[] s, size_t i) @safe pure

Given an index i into an array of characters s[], and assuming that index i is at the start of a UTF character, determine the number of UCS characters up to that index i.

fnsize_t toUCSindex(const scope wchar[] s, size_t i) @safe pure

ditto

fnsize_t toUCSindex(const scope dchar[] s, size_t i) @safe @nogc pure nothrow

ditto