A string to number conversion

Is there a simple way to convert a string “0-1” to a number so the value actually becomes -1?
Currently it just converts to a 0 (the first number in the string).
Thanks in advance.

I think you would need to parse all elements and look for math operators and then apply them… sounds like a headache… depending on how many numbers and operators you would expect.
If it’s just single digit-operator-single digit, it won’t be too hard.

1 Like