Answers for "char is digit rust"

0

char is digit rust

let mut base = 10;  
println!('1'.is_digit(base)); // true
println!('f'.is_digit(base)); // false
// base = 10 is probably what you're looking for
base = 16
println!('f'.is_digit(base)); // true
println!('g'.is_digit(base)); // false
Posted by: Guest on March-18-2022

Browse Popular Code Answers by Language