Returns the cursor's numeric position in the edit box, taking UTF-8 multi-byte character into account. If the EditBox contains multi-byte Unicode characters, the GetCursorPosition() method will not return correct results, as it considers each eight byte character to count as a single glyph. This method properly returns the position in the edit box from the perspective of the user.


position = EditBox:GetUTF8CursorPosition()


  • position - The cursor's numeric position (leftmost position is 0), taking UTF8 multi-byte characters into account. (number)