Function redox::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)
if num
represents one digit under radix
,
using one character of 0-9
or a-z
, or None
if it doesn't.
Panics
Panics if given an radix
> 36.
Examples
use std::char; let c = char::from_digit(4, 10); assert_eq!(c, Some('4'));