开发者

Converting decimal to hex with Erlang?

开发者 https://www.devze.com 2023-03-05 06:18 出处:网络
How to convert the decimal \"37\" to the hex Value \"25\" in Erlang开发者_开发百科? Is there a simple way?integer_to_list(Integer, Base) -> string() transforms an integer to a list of any base you

How to convert the decimal "37" to the hex Value "25" in Erlang开发者_开发百科? Is there a simple way?


integer_to_list(Integer, Base) -> string() transforms an integer to a list of any base you supply: http://erldocs.com/18.3/erts/erlang.html?i=3&search=integer_to#integer_to_list/2


A little simpler solution: httpd_util:integer_to_hexlist(Number) -> HexString

0

精彩评论

暂无评论...
验证码 换一张
取 消