Skip to main content

Module string

Module string 

Source
Expand description

UTF-16 string helpers.

Structs§

FixedLengthString
A fixed-length UTF-16 string, stored as a u16 array with a lazily cached String.
U16String
A UTF-16 string with no length limit, terminated by a 0, with a lazily cached String.

Functions§

cast_to_c_array
Transform string to [u16] without length limit but a \0 in the end.
cast_to_fix_length_array
Transform string to [u16] with a fixed size.
Differennt from ygopro, it will keeps 0 for residual part.
cast_to_string
transform [u16] to string.
return None if it’s illegal.