Простые типы / Символьный тип

// \' for a single quote.
let c1 = '\'';

// \" for a double quote.
let c2 = '\"';

// \\ for a backslash.
let c3 = '\\';

// \n for a new line.
let c4 = '\n';

// \r for a carriage return.
let c5 = '\r';

// \t for a horizontal tab.
let c6 = '\t';

// \x for a unicode character hex value.
let c7 = '\x41'// Symbol A

// \0 for a null character.
let c8 = '\0';

println!("c1 is '{c1}'");
println!("c2 is '{c2}'");
println!("c3 is '{c3}'");
println!("c4 is '{c4}'");
println!("c5 is '{c5}'");
println!("c6 is '{c6}'");
println!("c7 is '{c7}'");
println!("c8 is '{c8}'");