Skip to content

ParseFloat

Name Mandatory Description Default Type
⬅️ Input A string representing a number. String
Output ➡️ A floating-point number equivalent to the number contained in the string input. Float

Converts the string representation of a number to its floating-point number equivalent.

Details

This shard is only able to parse strings that represent floating-point numbers. It can handle: - Integer parts eg. "123" - Decimal points & Fractional parts eg. "123.456" - Scientific notation eg. "1.23e-4" - Leading whitespace (which is ignored) eg. " 123.456" - Leading plus or minus signs eg. "+123.456" or "-123.456"

Examples

1
2
"3.14" | ParseFloat | Log
Assert.Is(3.14 Break: true)

[info] [sample-wire] 3.14