[erlang-questions] binary_to_integer badarg

Dan Sommers 2QdxY4RzWzUUiLuE@REDACTED
Tue Dec 18 03:15:32 CET 2018


On 12/17/18 7:04 PM, Donald Steven wrote:

> This works fine and I'll get back, for example <<"%">>, which is_binary 
> tells me is a binary.  I've tried binary_to_integer(<<"%">>) but I get a 
> badarg error.

This does what you want, but there may be
better ways (I'm an Erlang newbie, too):

     <<Integer>> = Binary, Integer.

Dan



More information about the erlang-questions mailing list