isFloat

Returns true if this String can be parsed as a Float.

Parsing is the platform's own toFloatOrNull. All platforms accept a sign, an exponent, surrounding whitespace, NaN and Infinity. They differ on other forms: the JVM, Kotlin/Native and wasmJs also accept a trailing f/d and hexadecimal floating-point literals (0x1p3), and JS instead accepts hexadecimal integers (0x10).