Replies: 3 comments 2 replies
-
What float value should it be? There's a whitespace in it that probably ruin the parsing. V accepts _ as delimiters though |
Beta Was this translation helpful? Give feedback.
-
The space is very significant, as parsing usually stops at the first non-number. Same as if you had However, it is still a problem that it didn't get any number at all out of it (I would've expected it to set Have you tried using the |
Beta Was this translation helpful? Give feedback.
-
Converting string like
Thanks, @JalonSolov for help! |
Beta Was this translation helpful? Give feedback.
-
Hi. I'm new in V and compiled languages at all.
I asked a question on Stackoverflow, but no answers yet. So, maybe someone can help there.
The question is how to convert strings like
'2 345.5'
to number with decimal.What I'm doing is parsing JSON using
json.decode()
and Struct. Standard convertion to float gives0
:Output is:
Beta Was this translation helpful? Give feedback.
All reactions