Module string_io
Source Expand description
- This is for read/write strings from/to file with specific encoding and size, or read/write as NUL-terminated strings.
- read_bytes
- Read some bytes, and return the bytes, without you to create a local
vec![0u8; size]
and scratch your head with the messy codes - read_str
- Read a fixed-size string and decode it using the
StringCodecMaps
- read_str_by_code_page
- Read a fixed-size string and decode it using the
StringCodecMaps
while you can specify the code page. - read_sz
- Read a NUL terminated string and decode it.
- read_sz_by_code_page
- Read a NUL terminated string and decode it with the specified code page.
- read_sz_raw
- Read a NUL terminated string by raw, not decode it.
- write_str
- Write an encoded string.
- write_str_by_code_page
- Write an encoded string encoded with the specified code page.
- write_str_sized
- Write a fixed-size encoded string.