Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust convert a string (with decimals) to a floating point number.

let f = s.parse::<f32>().unwrap();
// Can also do:
let f: f32 = s.parse().unwrap();
 
PREVIOUS NEXT
Tagged: #rust #convert #string #floating #point
ADD COMMENT
Topic
Name
6+4 =