|
|
@ -10,6 +10,9 @@ |
|
|
|
format/2 |
|
|
|
, format/3 |
|
|
|
|
|
|
|
, formatBin/2 |
|
|
|
, formatBin/3 |
|
|
|
|
|
|
|
, scan/2 |
|
|
|
, build/1 |
|
|
|
, build/2 |
|
|
@ -60,6 +63,22 @@ format(Format, Args, Options) -> |
|
|
|
erlang:error(badarg, [Format, Args]) |
|
|
|
end. |
|
|
|
|
|
|
|
-spec formatBin(Format :: io:format(), Data :: [term()]) -> chars(). |
|
|
|
formatBin(Format, Args) -> |
|
|
|
try iolist_to_binary(fWrite(Format, Args)) |
|
|
|
catch |
|
|
|
_C:_R:S -> |
|
|
|
erlang:error(badarg, [Format, Args, _C, _R, S]) |
|
|
|
end. |
|
|
|
|
|
|
|
-spec formatBin(Format :: io:format(), Data :: [term()], Options :: [{charsLimit, CharsLimit :: charsLimit()}]) -> chars(). |
|
|
|
formatBin(Format, Args, Options) -> |
|
|
|
try iolist_to_binary(fWrite(Format, Args, Options)) |
|
|
|
catch |
|
|
|
_C:_R -> |
|
|
|
erlang:error(badarg, [Format, Args]) |
|
|
|
end. |
|
|
|
|
|
|
|
-spec scan(Format :: io:format(), Data :: [term()]) -> FormatList :: [char() | fmtSpec()]. |
|
|
|
scan(Format, Args) -> |
|
|
|
try fScan(Format, Args) |
|
|
|