/** * Convert a UTF-8 encoded bytes into a JS UTF-16 string */ export declare function bytesToString(buf: Uint8Array): string; /** * Convert JS UTF-16 string into UTF-8 encoded bytes */ export declare function stringToBytes(str: string): Uint8Array; /** * Compute the length of a JS string when encoded as UTF-8 bytes */ export declare function strUTF8Len(s: string): number; /** * Given a JS string `s` and an index `idx` of a character in it, compute the * corresponding byte offset of the character in the UTF-8 encoding of the * string. */ export declare function strUTF16IndexToUTF8Offset(s: string, idx: number): number; //# sourceMappingURL=unicode.d.ts.map