Single character



examples/chars/single/src/main.rs
fn main() {
    let chars = ['1', 'a', 'ื', 'ฮฉ', '๐Ÿ˜‡', '๐Ÿ˜ˆ'];
    for ch in chars {
        let usize_num = ch as usize;
        let u32_num = ch as u32;

        let back = char::from_u32(u32_num).expect("Could not convert to char");

        println!(
            "{ch}\t{usize_num:6} {u32_num:6} {back} \t{} {}",
            (ch == back),
            ch.len_utf8()
        );
    }
}

1	    49     49 1 	true 1
a	    97     97 a 	true 1
ื	  1488   1488 ื 	true 2
ฮฉ	   937    937 ฮฉ 	true 2
๐Ÿ˜‡	128519 128519 ๐Ÿ˜‡ 	true 4
๐Ÿ˜ˆ	128520 128520 ๐Ÿ˜ˆ 	true 4