pub type BSFixedStringW = BSFixedStringInternal<U16>;
Expand description
Fixed length wide C string.
§Encoding
Since this is an FFI type, the encoding is not guaranteed. It may be UTF-16LE,
UTF-32LE, or platform-specific wide encoding, as it uses wchar_t
internally.
Therefore, when using this string, it is recommended to convert it to &str
to handle it safely.
Aliased Type§
struct BSFixedStringW { /* private fields */ }
Implementations§
Source§impl BSFixedStringW
impl BSFixedStringW
Sourcepub const unsafe fn new_unchecked(data: *const u16) -> Self
pub const unsafe fn new_unchecked(data: *const u16) -> Self
§Safety
data
must be a pointer to a null-terminated UTF-16LE string.
Sourcepub fn to_string_lossy(&self) -> String
pub fn to_string_lossy(&self) -> String
Decode a UTF-16–encoded slice v into a String