aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src/format_lib_supp.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-06-28 16:49:26 +0200
committerSiri Hansen <[email protected]>2017-09-15 17:07:48 +0200
commit15abdca7ef9c6fb7812f13829346db59173e5681 (patch)
treeac3b875273b6f26201b828c54d740295a9ca5651 /lib/sasl/src/format_lib_supp.erl
parent4f3289a5d3b3ddd08d6e8a42909634b38d7d2a5a (diff)
downloadotp-15abdca7ef9c6fb7812f13829346db59173e5681.tar.gz
otp-15abdca7ef9c6fb7812f13829346db59173e5681.tar.bz2
otp-15abdca7ef9c6fb7812f13829346db59173e5681.zip
sasl: Do not use deprecated functions in string(3)
Diffstat (limited to 'lib/sasl/src/format_lib_supp.erl')
-rw-r--r--lib/sasl/src/format_lib_supp.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sasl/src/format_lib_supp.erl b/lib/sasl/src/format_lib_supp.erl
index 80dcdc91da..cfe2ec7668 100644
--- a/lib/sasl/src/format_lib_supp.erl
+++ b/lib/sasl/src/format_lib_supp.erl
@@ -100,13 +100,13 @@ print_newlines(Device, N) when N > 0 ->
print_one_line(Device, Line, Key, Value) ->
Modifier = misc_supp:modifier(Device),
StrKey = term_to_string(Key,Modifier),
- KeyLen = lists:min([length(StrKey), Line]),
+ KeyLen = lists:min([string:length(StrKey), Line]),
ValueLen = Line - KeyLen,
Format1 = lists:concat(["~-", KeyLen, Modifier, "s"]),
Format2 = lists:concat(["~", ValueLen, Modifier, "s~n"]),
io:format(Device, Format1, [StrKey]),
Try = term_to_string(Value,Modifier),
- Length = length(Try),
+ Length = string:length(Try),
if
Length < ValueLen ->
io:format(Device, Format2, [Try]);
@@ -117,7 +117,7 @@ print_one_line(Device, Line, Key, Value) ->
end.
term_to_string(Value,Modifier) ->
- lists:flatten(io_lib:format(get_format(Value,Modifier), [Value])).
+ io_lib:format(get_format(Value,Modifier), [Value]).
get_format([],_) ->
"~p";