To convert a single char to an integer in Rust, use .to_digit(RADIX) . The radix value is used for conversion, 10 for decimal, 16 for hexadecimal.
確定! 回上一頁