diff options
author | Hans Bolinder <[email protected]> | 2017-06-28 13:05:53 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-07-06 17:53:22 +0200 |
commit | 792450913beef0b2eec3e3b0a4ebad14563ecadb (patch) | |
tree | 95080fad454bda3ceda26739d775765d62a7aea4 /lib/stdlib/src/ets.erl | |
parent | e2b9eb8735416ded58fbcdfbe11a90b7885f8a31 (diff) | |
download | otp-792450913beef0b2eec3e3b0a4ebad14563ecadb.tar.gz otp-792450913beef0b2eec3e3b0a4ebad14563ecadb.tar.bz2 otp-792450913beef0b2eec3e3b0a4ebad14563ecadb.zip |
stdlib: Do not use deprecated functions in string(3)
Diffstat (limited to 'lib/stdlib/src/ets.erl')
-rw-r--r-- | lib/stdlib/src/ets.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl index 898b2f5bba..b581a66a73 100644 --- a/lib/stdlib/src/ets.erl +++ b/lib/stdlib/src/ets.erl @@ -1717,7 +1717,7 @@ get_line(P, Default) -> line_string(Binary) when is_binary(Binary) -> unicode:characters_to_list(Binary); line_string(Other) -> Other. -nonl(S) -> string:strip(S, right, $\n). +nonl(S) -> string:trim(S, trailing, "$\n"). print_number(Tab, Key, Num) -> Os = ets:lookup(Tab, Key), @@ -1746,7 +1746,7 @@ do_display_item(_Height, Width, I, Opos) -> L = to_string(I), L2 = if length(L) > Width - 8 -> - string:substr(L, 1, Width-13) ++ " ..."; + string:slice(L, 0, Width-13) ++ " ..."; true -> L end, |