UNPKG

@jsonjoy.com/util

Version:
9 lines 284 B
/** * Given a JavaScript string, computes how many bytes it will take to encode * that string in UTF-8. * * @param str JavaScript string. * @returns Length in bytes if encoded as UTF-8. */ export declare function utf8Size(str: string): number; //# sourceMappingURL=utf8.d.ts.map