getcharindex -- convert from byte to character index (V7.0)
Synopsis
int idx = getcharindex(const char *s, int byteindex);
Function
Returns the character index of the byte position inside s specified by byteindex.
Both indices are counted from 0. String s must be a valid UTF-8 string and byteindex must point to
a valid byte index inside s.