Mojo function
atof
atof(str: String) -> SIMD[float64, 1]
Parses the given string as a floating point and returns that value.
For example, atof("2.25")
returns 2.25
.
Args:
- βstr (
String
): A string to be parsed as a floating point.
Returns:
An floating point value that represents the string, or otherwise raises.
Raises:
If the given string cannot be parsed as an floating point value, for example in atof("hi")
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
If you'd like to share more information, please report an issue on GitHub
π What went wrong?