Skip to content

Instantly share code, notes, and snippets.

@mfpiccolo
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfpiccolo/87483d24a74a7d0bc5bd to your computer and use it in GitHub Desktop.
Save mfpiccolo/87483d24a74a7d0bc5bd to your computer and use it in GitHub Desktop.
#[no_mangle]
pub extern fn number_to_char_array() -> Vec<String> {
let mut utf_chars: Vec<String> = vec![];
for i in 33..126 {
let maybe_char: Option<char> = std::char::from_u32(i);
utf_chars.push(maybe_char.unwrap().to_string());
}
utf_chars
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment