aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2017-08-22 16:58:51 +0200
committerSiri Hansen <[email protected]>2017-09-15 17:07:52 +0200
commit3655794f0f1b0abe3629d7d7aa1f34cb6220b04f (patch)
treef2f6b576c5f5917f303a83d90ca50519083d950b /lib/dialyzer
parent84c1a428add022aa775360c4dc93c04bb8cb2613 (diff)
downloadotp-3655794f0f1b0abe3629d7d7aa1f34cb6220b04f.tar.gz
otp-3655794f0f1b0abe3629d7d7aa1f34cb6220b04f.tar.bz2
otp-3655794f0f1b0abe3629d7d7aa1f34cb6220b04f.zip
dialyzer (test): Do not use deprecated functions in string(3)
Diffstat (limited to 'lib/dialyzer')
-rw-r--r--lib/dialyzer/test/dialyzer_common.erl10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/dialyzer/test/dialyzer_common.erl b/lib/dialyzer/test/dialyzer_common.erl
index 48083a2731..1a8403f486 100644
--- a/lib/dialyzer/test/dialyzer_common.erl
+++ b/lib/dialyzer/test/dialyzer_common.erl
@@ -221,13 +221,9 @@ get_suites(Dir) ->
end.
suffix(String, Suffix) ->
- case string:rstr(String, Suffix) of
- 0 -> no;
- Index ->
- case string:substr(String, Index) =:= Suffix of
- true -> {yes, string:sub_string(String,1,Index-1)};
- false -> no
- end
+ case string:split(String, Suffix, trailing) of
+ [Prefix,[]] -> {yes, Prefix};
+ _ -> no
end.
-spec create_suite(string()) -> 'ok'.