summaryrefslogtreecommitdiff
path: root/src/str.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-10-17 13:37:23 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2016-10-17 13:37:23 +0300
commit67720c77137da2e80907f67dccc96fcbdb44c3bf (patch)
treed3b44d577312ee0f94c46d3c03691279d329f16d /src/str.erl
parentUpdate riakc to support r19 (diff)
Add more MUC tests
Diffstat (limited to 'src/str.erl')
-rw-r--r--src/str.erl6
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
%%%===================================================================