Skip to main content

decode_utf16_checked

Function decode_utf16_checked 

Source
pub(crate) fn decode_utf16_checked(
    bytes: &[u8],
    little_endian: bool,
    fatal: bool,
) -> Option<String>
Expand description

UTF-16(LE/BE)のバイト列を Rust String へデコードする。不正な サロゲートは仕様どおり置換文字(U+FFFD)に置き換える(fatal なら None)。