diff options
author | Hans Bolinder <[email protected]> | 2017-06-28 16:11:34 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-07-06 17:53:23 +0200 |
commit | abb8e79663d0527f2987d1d7e914c65117b396a9 (patch) | |
tree | fa896b44cc0e208afa6d7c7ee9a16d8f2c835095 /lib/kernel/src/group.erl | |
parent | e2f42f4ce7d2cb2a9eaa1cfeb1b6b69b061704f7 (diff) | |
download | otp-abb8e79663d0527f2987d1d7e914c65117b396a9.tar.gz otp-abb8e79663d0527f2987d1d7e914c65117b396a9.tar.bz2 otp-abb8e79663d0527f2987d1d7e914c65117b396a9.zip |
kernel: Do not use deprecated functions in string(3)
Diffstat (limited to 'lib/kernel/src/group.erl')
-rw-r--r-- | lib/kernel/src/group.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/kernel/src/group.erl b/lib/kernel/src/group.erl index bf785959ff..a5210901f2 100644 --- a/lib/kernel/src/group.erl +++ b/lib/kernel/src/group.erl @@ -793,9 +793,9 @@ search_up_stack(Stack, Substr) -> case up_stack(Stack) of {none,NewStack} -> {none,NewStack}; {L, NewStack} -> - case string:str(L, Substr) of - 0 -> search_up_stack(NewStack, Substr); - _ -> {string:strip(L,right,$\n), NewStack} + case string:find(L, Substr) of + nomatch -> search_up_stack(NewStack, Substr); + _ -> {string:trim(L, trailing, "$\n"), NewStack} end end. @@ -803,9 +803,9 @@ search_down_stack(Stack, Substr) -> case down_stack(Stack) of {none,NewStack} -> {none,NewStack}; {L, NewStack} -> - case string:str(L, Substr) of - 0 -> search_down_stack(NewStack, Substr); - _ -> {string:strip(L,right,$\n), NewStack} + case string:find(L, Substr) of + nomatch -> search_down_stack(NewStack, Substr); + _ -> {string:trim(L, trailing, "$\n"), NewStack} end end. |