Skip to main content

decode_string

Function decode_string 

Source
pub fn decode_string(buf: &mut [u8])
Expand description

Decodes a string in place

This is used for map names and sign text in map files

ยงExamples

use eolib::data::decode_string;

let mut buf = [0x69, 0x36, 0x5E, 0x49];
decode_string(&mut buf);

let name = String::from_utf8_lossy(&buf).to_string();
assert_eq!(name, "Void");