A simple string to float conversion?

KitCarlson

Active Member
Licensed User
Longtime User
I am developing an android BT interface for and embedded controller. In the embedded side integers are used for speed requirements. On the android side delimited strings of numeric text are use to display setting parameters. I also use the Chart Module plot the values, and it needs the values in float.

Presently replace is used to replace " " with ".0 " in the strings, then Regex.split, followed by a For Loop, to equate the Strings to Float. All is working, however it seems there might be a better way. Any ideas?
 

Theera

Well-Known Member
Licensed User
Longtime User
you can use NumberFormat()
 
Upvote 0
Top