字符类型使用 char 来表示,用单引号来定义,一个字符占用四个字节。
char
fn main() { let c = 'z'; let z = 'ℤ'; let heart_eyed_cat = ''; }
介绍了 Rust 中的字符类型。