How do I convert a float to a string in F#. I'm looking for a function with this signature:
float -> string
The Float. toString() method can also be used to convert the float value to a String. The toString() is the static method of the Float class.
We can convert float to a string easily using str() function.
Use the 'string' function.
string 6.3f
> sprintf "%f";;
val it : (float -> string) = <fun:it@8>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With