分割Binary数据

2009-03-09
在Erlang中分割binary有如下两种方式:
<<Bin1:Num/binary,Bin2/binary>> = Bin
{Bin1,Bin2}=split_binary(Bin,Num)

前者效率较高

M-OSCAR | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com