luau-utf16 is a library for using utf16 in luau.
pesde
pesde add kimpure/utf16
submodule
git submodule add https://github.com/kimpure/luau-utf16 lune-utf16
require:
local utf16 = require('path');
encode:
local encodeA = utf16.encode('A');
print(encodeA); -- << "0041"
decode:
local decodeA = utf16.decode(encodeA);
print(decodeA); -- << "A"
codepoint:
print(utf16.codepoint('A')); -- << 65