[erlang-questions] direct binary to integer conversion

Muharem Hrnjadovic muharem@REDACTED
Sat Dec 31 18:22:44 CET 2011

On 12/31/2011 04:30 PM, Zabrane Mickael wrote:
> This may be could help (for non negative integers):
> https://github.com/extend/cowboy/blob/master/src/cowboy_http.erl#L534
Thanks for the pointer! Will take a look.

> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111231/337193e9/attachment.bin>

More information about the erlang-questions mailing list