[erlang-questions] direct binary to integer conversion
Zabrane Mickael
zabrane3@REDACTED
Sat Dec 31 16:30:20 CET 2011
This may be could help (for non negative integers):
https://github.com/extend/cowboy/blob/master/src/cowboy_http.erl#L534
Regards,
Zabrane
On Dec 31, 2011, at 3:38 PM, Muharem Hrnjadovic wrote:
> Hello there!
>
> Is there a way to convert a binary to an integer *directly*? Right now I
> am using the following construct:
>
> string:to_integer(binary_to_list(B))
>
> where B is a binary.
>
> Best regards/Mit freundlichen Grüßen
>
> --
> Muharem Hrnjadovic <muharem@REDACTED>
> Public key id : B2BBFCFC
> Key fingerprint : A5A3 CC67 2B87 D641 103F 5602 219F 6B60 B2BB FCFC
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111231/c497e0a0/attachment.htm>
More information about the erlang-questions
mailing list