diff options
Diffstat (limited to 'src/str.erl')
-rw-r--r-- | src/str.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/str.erl b/src/str.erl index 27d21075..439ae6a7 100644 --- a/src/str.erl +++ b/src/str.erl @@ -64,6 +64,7 @@ to_float/1, prefix/2, suffix/2, + format/2, to_integer/1]). %%%=================================================================== @@ -277,6 +278,11 @@ prefix(Prefix, B) -> suffix(B1, B2) -> lists:suffix(binary_to_list(B1), binary_to_list(B2)). +-spec format(io:format(), list()) -> binary(). + +format(Format, Args) -> + iolist_to_binary(io_lib:format(Format, Args)). + %%%=================================================================== %%% Internal functions %%%=================================================================== |