aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/epp.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-06-28 13:05:53 +0200
committerSiri Hansen <[email protected]>2017-07-06 17:53:22 +0200
commit792450913beef0b2eec3e3b0a4ebad14563ecadb (patch)
tree95080fad454bda3ceda26739d775765d62a7aea4 /lib/stdlib/src/epp.erl
parente2b9eb8735416ded58fbcdfbe11a90b7885f8a31 (diff)
downloadotp-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/epp.erl')
-rw-r--r--lib/stdlib/src/epp.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl
index 31d0d499e3..00e6a10d8a 100644
--- a/lib/stdlib/src/epp.erl
+++ b/lib/stdlib/src/epp.erl
@@ -479,7 +479,7 @@ com_enc(_B, _Fun, _N, L, Ps) ->
com_enc_end([L | Ps]).
com_enc_end(Ps0) ->
- Ps = lists:reverse([lists:reverse(string:to_lower(P)) || P <- Ps0]),
+ Ps = lists:reverse([lists:reverse(lowercase(P)) || P <- Ps0]),
com_encoding(Ps).
com_encoding(["latin","1"|_]) ->
@@ -489,6 +489,9 @@ com_encoding(["utf","8"|_]) ->
com_encoding(_) ->
throw(no). % Don't try any further
+lowercase(S) ->
+ unicode:characters_to_list(string:lowercase(S)).
+
normalize_typed_record_fields([]) ->
{typed, []};
normalize_typed_record_fields(Fields) ->