Created
February 16, 2012 12:45
-
-
Save burinov/1844597 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-spec remove_commas(B :: binary()) -> binary(). | |
remove_commas(B) -> | |
case binary:last(B) of | |
$, -> | |
remove_commas(binary_part(B, 0, byte_size(B)-1)); | |
_ -> | |
B | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment