Here is one solution.<br><br>list_to_binary([list_to_integer(X) || X <- string:tokens("00:11:22:33:44:55", ":")]).<br><br>cheers<br>Chandru<br><br><div class="gmail_quote">On 19 October 2011 00:02, Wes James <span dir="ltr"><<a href="mailto:comptekki@gmail.com">comptekki@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Is there a way to get "00:11:22:33:44:55" in to this format<br>
<<16#00,16#11,16#22,16#33,16#44,16#55>>?<br>
<br>
I can do string:tokens(S) to split the string (list) up, but how do<br>
you put back in <<16#....>> format?<br>
<br>
thanks,<br>
<br>
-wes<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>