1414 */
1515declare namespace utf8 {
1616 /**
17- * Returns the position of the n-th character of s (counting from byte
18- * position i) as two integers: The index (in bytes) where its encoding
17+ * Returns the position of the n-th character of s (counting from byte
18+ * position i) as two integers: The index (in bytes) where its encoding
1919 * starts and the index (in bytes) where it ends.
2020 *
21- * If the specified character is right after the end of s, the function
22- * behaves as if there was a '\0' there. If the specified character is
21+ * If the specified character is right after the end of s, the function
22+ * behaves as if there was a '\0' there. If the specified character is
2323 * neither in the subject nor right after its end, the function returns fail.
2424 *
25- * A negative n gets characters before position i. The default for i is 1
26- * when n is non-negative and #s + 1 otherwise, so that utf8.offset(s,-n)
25+ * A negative n gets characters before position i. The default for i is 1
26+ * when n is non-negative and #s + 1 otherwise, so that utf8.offset(s,-n)
2727 * gets the offset of the n-th character from the end of the string.
2828 *
2929 * As a special case, when n is 0 the function returns the start of the
@@ -32,4 +32,4 @@ declare namespace utf8 {
3232 * This function assumes that s is a valid UTF-8 string.
3333 */
3434 function offset ( s : string , n ?: number , i ?: number ) : LuaMultiReturn < [ number , number ] > ;
35- }
35+ }
0 commit comments