Permalink
Browse files

Simpler integer to hex string conversion.

  • Loading branch information...
1 parent c4991ff commit 5715632daa6f22dccfa7763010f70ed7efb6af3b @fdmanana committed Nov 10, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/ibrowse_lib.erl
View
@@ -166,7 +166,7 @@ status_code(_) -> unknown_status_code.
%% @doc Returns a string with the hexadecimal representation of a given decimal.
%% N = integer() -- the number to represent as hex
%% @spec dec2hex(N::integer()) -> string()
-dec2hex(N) -> lists:flatten(io_lib:format("~.16B", [N])).
+dec2hex(N) -> integer_to_list(N, 16).
%% @doc Implements the base64 encoding algorithm. The output data type matches in the input data type.
%% @spec encode_base64(In) -> Out

0 comments on commit 5715632

Please sign in to comment.