• Returns the number of UTF-8 codepoints in the string str that start between positions i and j (both inclusive). The default for i is 0 and for j is -1. If it finds any invalid byte sequence, returns a false value plus the position of the first invalid byte.

    Parameters

    • s: string
    • Optional i: number
    • Optional j: number

    Returns LuaTuple<[number, undefined] | [false, number]>