diff options
author | Dan Gudmundsson <[email protected]> | 2017-08-23 09:43:35 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-15 17:07:52 +0200 |
commit | 5a9f3a48b2a6b58df16eb4a78d50ecd8f378bbd8 (patch) | |
tree | 4f2ad71e0a2f5202cfc3cbc9756a31c5f653eb0f /lib/hipe/test/opt_verify_SUITE.erl | |
parent | 3655794f0f1b0abe3629d7d7aa1f34cb6220b04f (diff) | |
download | otp-5a9f3a48b2a6b58df16eb4a78d50ecd8f378bbd8.tar.gz otp-5a9f3a48b2a6b58df16eb4a78d50ecd8f378bbd8.tar.bz2 otp-5a9f3a48b2a6b58df16eb4a78d50ecd8f378bbd8.zip |
hipe (test): Do not use deprecated functions in string(3)
Diffstat (limited to 'lib/hipe/test/opt_verify_SUITE.erl')
-rw-r--r-- | lib/hipe/test/opt_verify_SUITE.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hipe/test/opt_verify_SUITE.erl b/lib/hipe/test/opt_verify_SUITE.erl index 86083fa02b..79bc2f1f73 100644 --- a/lib/hipe/test/opt_verify_SUITE.erl +++ b/lib/hipe/test/opt_verify_SUITE.erl @@ -59,7 +59,7 @@ call_elim_test_file(Config, FileName, Option) -> substring_count(Icode, Substring) -> substring_count(Icode, Substring, 0). substring_count(Icode, Substring, N) -> - case string:str(Icode, Substring) of - 0 -> N; - I -> substring_count(lists:nthtail(I, Icode), Substring, N+1) + case string:find(Icode, Substring) of + nomatch -> N; + Prefix -> substring_count(string:prefix(Prefix, Substring), Substring, N+1) end. |