I am looking for an easy way to reverse an integer in erlang. Example: 1234 to 4321.
You can use some of the built in functions to do this easily.
1> list_to_integer(lists:reverse(integer_to_list(1234))).
4321
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With