byte_size
此方法返回Bitstring包含的字节数。
语法 (Syntax)
byte_size(bitstring)
参数 (Parameters)
bitstring - 这是需要确定字节数的btistring。
返回值 (Return Value)
该方法返回Bitstring包含的字节数。
例如 (For example)
-module(helloworld).
-export([start/0]).
start() ->
io:fwrite("~p~n",[byte_size(<<1,2,3>>)]).
输出 (Output)
当我们运行上述程序时,我们将得到以下结果。
3