Question : convert string to i32
Answered by : huldar
//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();
Source : https://stackoverflow.com/questions/27043268/convert-a-string-to-int-in-rust | Last Update : Tue, 04 Aug 20