|
|
@ -35,8 +35,8 @@ |
|
|
|
format/2 |
|
|
|
, format/3 |
|
|
|
|
|
|
|
, formatBin/2 |
|
|
|
, formatBin/3 |
|
|
|
, formatIol/2 |
|
|
|
, formatIol/3 |
|
|
|
|
|
|
|
, scan/2 |
|
|
|
, build/1 |
|
|
@ -86,7 +86,7 @@ on_load() -> |
|
|
|
|
|
|
|
-spec format(Format :: format(), Data :: [term()]) -> chars(). |
|
|
|
format(Format, Args) -> |
|
|
|
try fWrite(Format, Args) |
|
|
|
try iolist_to_binary(fWrite(Format, Args)) |
|
|
|
catch |
|
|
|
C:R:S -> |
|
|
|
erlang:error(badarg, [Format, Args, {C, R, S}]) |
|
|
@ -94,27 +94,23 @@ format(Format, Args) -> |
|
|
|
|
|
|
|
-spec format(Format :: format(), Data :: [term()], Options :: [{charsLimit, CharsLimit :: charsLimit()}]) -> chars(). |
|
|
|
format(Format, Args, Options) -> |
|
|
|
try fWrite(Format, Args, Options) |
|
|
|
try iolist_to_binary(fWrite(Format, Args, Options)) |
|
|
|
catch |
|
|
|
C:R:S -> |
|
|
|
erlang:error(badarg, [Format, Args, {C, R, S}]) |
|
|
|
end. |
|
|
|
|
|
|
|
-spec formatBin(Format :: format(), Data :: [term()]) -> chars(). |
|
|
|
formatBin(Format, Args) -> |
|
|
|
try fWrite(Format, Args) of |
|
|
|
Ret -> |
|
|
|
iolist_to_binary(Ret) |
|
|
|
-spec formatIol(Format :: format(), Data :: [term()]) -> chars(). |
|
|
|
formatIol(Format, Args) -> |
|
|
|
try fWrite(Format, Args) |
|
|
|
catch |
|
|
|
C:R:S -> |
|
|
|
erlang:error(badarg, [Format, Args, {C, R, S}]) |
|
|
|
end. |
|
|
|
|
|
|
|
-spec formatBin(Format :: format(), Data :: [term()], Options :: [{charsLimit, CharsLimit :: charsLimit()}]) -> chars(). |
|
|
|
formatBin(Format, Args, Options) -> |
|
|
|
try fWrite(Format, Args, Options) of |
|
|
|
Ret -> |
|
|
|
iolist_to_binary(Ret) |
|
|
|
-spec formatIol(Format :: format(), Data :: [term()], Options :: [{charsLimit, CharsLimit :: charsLimit()}]) -> chars(). |
|
|
|
formatIol(Format, Args, Options) -> |
|
|
|
try fWrite(Format, Args, Options) |
|
|
|
catch |
|
|
|
C:R:S -> |
|
|
|
erlang:error(badarg, [Format, Args, {C, R, S}]) |
|
|
|