The function type is integer.
The returned value is an integer that is equal to the index of the nth UTF-8 or UTF-16 character (as specified by argument-2) in argument-1.
This function supports ideographic variation selectors (IVS), allowing the font software to select a different glyph from the default. (If no variation exists or supported then the font software will ignore it.) An IVS consists of Unicode characters in the range U-E0100 – U-E01EF. UTF-16 strings use surrogate pairs in the range U-DB40 + DD00 - U-DB40 + DDEF, and UTF-8 strings use the range 0xF3A08480 - 0xF3A087AF.
A Unicode character followed by an IVS is treated as one character when this function is processed.