1/** 2 * Calculates the UTF8 byte length of a string. 3 * @param {string} string String 4 * @returns {number} Byte length 5 */ 6export function length(string: string): number; 7 8/** 9 * Reads UTF8 bytes as a string. 10 * @param {Uint8Array} buffer Source buffer 11 * @param {number} start Source start 12 * @param {number} end Source end 13 * @returns {string} String read 14 */ 15export function read(buffer: Uint8Array, start: number, end: number): string; 16 17/** 18 * Writes a string as UTF8 bytes. 19 * @param {string} string Source string 20 * @param {Uint8Array} buffer Destination buffer 21 * @param {number} offset Destination offset 22 * @returns {number} Bytes written 23 */ 24export function write(string: string, buffer: Uint8Array, offset: number): number; 25 26