Skip to content

Instantly share code, notes, and snippets.

@burinov
Created February 16, 2012 12:45
Show Gist options
  • Save burinov/1844597 to your computer and use it in GitHub Desktop.
Save burinov/1844597 to your computer and use it in GitHub Desktop.
-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