For example: I have the number 123.456 and want to return 456.
The function trunc()
basically isolates (truncates) the numbers before the decimal.
Is there a function to isolate just the digits after the decimal?
Two follow-up questions:
Is there a way to do this without writing out the regex?
What if I want to maintain the sign? For example, if I wanted to (reverse) truncate -123.456 to -456.