To convert a string to an integer in Rust, use parse() function. The parse function needs to know ... let str = "123"; let num: i32 = str.parse().unwrap();.
確定! 回上一頁