Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如问题所说,是否有任何功能或模块可以执行inet_addr?
inet_addr
谷歌的结果没有建议任何直接的方式,或者我错过了什么?
谢谢。
您可以使用 inet_parse:address,然后将结果列表转换为二进制。例如
16> list_to_binary(tuple_to_list(element(2,inet_parse:address("192.168.42.2")))).
<<192,168,42,2>>