Answers for "convert string to i32"

0

convert string to i32

//You can convert a string to an integer using the parse method
let my_string = "27".to_string();  // `parse()` works with `&str` and `String`!
let my_int = my_string.parse::<i32>().unwrap();
Posted by: Guest on July-28-2020

Code answers related to "convert string to i32"

Browse Popular Code Answers by Language