mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Remove obsolete code for Erlang/OTP older than 20.0
This commit is contained in:
parent
0d31482647
commit
9a6bd83aa1
@ -598,17 +598,9 @@ get_shell_info() ->
|
||||
_:_ -> {78, false}
|
||||
end.
|
||||
|
||||
%% Erlang/OTP 20.0 introduced string:find/2, but we must support old 19.3
|
||||
string_find([], _SearchPattern) ->
|
||||
nomatch;
|
||||
string_find([A | String], [A]) ->
|
||||
String;
|
||||
string_find([_ | String], SearchPattern) ->
|
||||
string_find(String, SearchPattern).
|
||||
|
||||
%% Split this command description in several lines of proper length
|
||||
prepare_description(DescInit, MaxC, Desc) ->
|
||||
case string_find(Desc, "\n") of
|
||||
case string:find(Desc, "\n") of
|
||||
nomatch ->
|
||||
prepare_description2(DescInit, MaxC, Desc);
|
||||
_ ->
|
||||
|
Loading…
Reference in New Issue
Block a user