Logo

Programming-Idioms

History of Idiom 146 > diff from v9 to v10

Edit summary for version 10 by TheVTM:
[Rust] Semicolon

Version 9

2017-04-27, 10:23:47

Version 10

2017-04-27, 10:24:22

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Extra Keywords
real conversion
Extra Keywords
real conversion
Code
let f = s.parse::<f32>().unwrap()
Code
let f = s.parse::<f32>().unwrap();
Doc URL
https://doc.rust-lang.org/std/primitive.str.html#method.parse
Doc URL
https://doc.rust-lang.org/std/primitive.str.html#method.parse
Demo URL
https://is.gd/r7DSaS
Demo URL
https://is.gd/r7DSaS