I have a mixed string with numbers and operations (only), like "1234567.89+876-5432*10.1234"
.
And each time I click a number, it will add it to that string (so I need to keep it as only 1 string).
I'm trying to add thousand separators (comma).
so the results I'm trying to get is "1,234,567.89+876-5,432*10.1234"
.
Note: It needs to be added automatically as the user typing. Please.
I tried to read about it all over the place, but couldn't figure how to achieve that. Thank you so much for any help.
Every time you wanna add a number to the string , convert it into a string and put a comma at the end and then add it to the main string.
if you have a number like 20.
and then just add the convertedNumb to the main string
Then probably you need to put that in a event trigger for any key pressed.