Word16 package:os-string

ShortByteStrings encoded as UTF16-LE, suitable for windows FFI calls. Word16s are *always* in BE encoding (both input and output), so e.g. pack takes a list of BE encoded [Word16] and produces a UTF16-LE encoded ShortByteString. Likewise, unpack takes a UTF16-LE encoded ShortByteString and produces a list of BE encoded [Word16]. Indices and lengths are always in respect to Word16, not Word8. All functions will error out if the input string is not a valid UTF16 stream (uneven number of bytes). So use this module with caution.
Total conversion to char.
Decode Word16 from little-endian.
Encode Word16 as little-endian.
This is like length, but the number of Word16, not Word8.