LoginSignup
5
4

More than 5 years have passed since last update.

Rustでも愛が生まれた

Last updated at Posted at 2016-05-09

see http://qiita.com/dongri/items/041ff3e7dde6c99beeb0

use std::char;

fn main() {
  let love = char::from_u32(('生' as u32) & ('死' as u32)).unwrap();
  print!("{}", love)
}

安全じゃないやつ(unsafe版)。

use std::char;

fn main() {
  let love = unsafe { char::from_u32_unchecked(('生' as u32) & ('死' as u32)) };
  print!("{}", love)
}
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4