Function rustc_unicode::char::from_digit
[−]
[src]
pub fn from_digit(num: u32, radix: u32) -> Option<char>
Converts a number to the character representing it.
Return value
Returns Some(char)`Some(char)if` if num`numrepresents one digit under` represents one digit under radix`radix, using one character of`,
using one character of 0-9`0-9or` or a-z`a-z, or`, or None`None` if it doesn't.
Panics
Panics if given an radix`radix` > 36.
Examples
fn main() { use std::char; let c = char::from_digit(4, 10); assert_eq!(c, Some('4')); }use std::char; let c = char::from_digit(4, 10); assert_eq!(c, Some('4'));