Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Character-codes/Rust/character-codes.rust
Normal file
11
Task/Character-codes/Rust/character-codes.rust
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use std::char::from_u32;
|
||||
|
||||
fn main() {
|
||||
//ascii char
|
||||
println!("{}", 'a' as u8);
|
||||
println!("{}", 97 as char);
|
||||
|
||||
//unicode char
|
||||
println!("{}", 'π' as u32);
|
||||
println!("{}", from_u32(960).unwrap());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue