pub fn my_atoi(s: String) -> i32
Expand description

Convert string to 32-bit integer

Arguments

  • s - input string

Examples

use leetcode_rust::problems::p000_0xx::p000_008::my_atoi;
 
assert!(my_atoi(String::from("-12.5")) == -12);