We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d23bf9 commit 66034b6Copy full SHA for 66034b6
src/common_file_operations.rs
@@ -19,7 +19,8 @@ pub(crate) fn write_bool_as<T: std::convert::From<u8>>(x: &bool) -> T {
19
}
20
21
pub(crate) fn read_string(byte_stream: Vec<u8>) -> String {
22
- String::from_utf8(byte_stream).unwrap()
+ let str = String::from_utf8(byte_stream).unwrap();
23
+ str.trim_matches(char::from(0)).to_string() // trim \0 from the end of strings
24
25
26
pub(crate) fn write_string(str: &String) -> Vec<u8> {
0 commit comments