diff options
author | Hans Bolinder <[email protected]> | 2017-06-27 12:58:27 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-07-06 17:53:22 +0200 |
commit | 4b98c91182ac5f2fcd5a616874512abe526c1634 (patch) | |
tree | e00f0d9cc49a59d70285ca090de6022530f63605 /lib | |
parent | 796a110362b780abadcb114940e6fadd14105ff4 (diff) | |
download | otp-4b98c91182ac5f2fcd5a616874512abe526c1634.tar.gz otp-4b98c91182ac5f2fcd5a616874512abe526c1634.tar.bz2 otp-4b98c91182ac5f2fcd5a616874512abe526c1634.zip |
edoc: Do not use deprecated functions in string(3)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/edoc/src/edoc_layout.erl | 6 | ||||
-rw-r--r-- | lib/edoc/src/edoc_specs.erl | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl index eafab0588e..baa147410b 100644 --- a/lib/edoc/src/edoc_layout.erl +++ b/lib/edoc/src/edoc_layout.erl @@ -608,7 +608,7 @@ etypef([Cs | L], St, O, R, Opts) -> app_fix(L, Opts) -> try {"//" ++ R1,L2} = app_fix1(L, 1), - [App, Mod] = string:tokens(R1, "/"), + [App, Mod] = string:lexemes(R1, "/"), "//" ++ atom(App, Opts) ++ "/" ++ atom(Mod, Opts) ++ L2 catch _:_ -> L end. @@ -1120,13 +1120,13 @@ ot_integer(E) -> {integer,0,list_to_integer(get_attrval(value, E))}. ot_range(E) -> - [I1, I2] = string:tokens(get_attrval(value, E), "."), + [I1, I2] = string:lexemes(get_attrval(value, E), "."), {type,0,range,[{integer,0,list_to_integer(I1)}, {integer,0,list_to_integer(I2)}]}. ot_binary(E) -> {Base, Unit} = - case string:tokens(get_attrval(value, E), ",:*><") of + case string:lexemes(get_attrval(value, E), ",:*><") of [] -> {0, 0}; ["_",B] -> diff --git a/lib/edoc/src/edoc_specs.erl b/lib/edoc/src/edoc_specs.erl index fb04bfce0e..26b7202462 100644 --- a/lib/edoc/src/edoc_specs.erl +++ b/lib/edoc/src/edoc_specs.erl @@ -83,7 +83,7 @@ spec(Form, Clause) -> %% the given Erlang spec and an empty list of arguments. dummy_spec(Form) -> {#t_name{name = Name}, Arity, TypeSpecs} = get_spec(Form), - As = string:join(lists:duplicate(Arity, "_X"), ","), + As = lists:join(",", lists:duplicate(Arity, "_X")), S = lists:flatten(io_lib:format("~p(~s) -> true\n", [Name, As])), #tag{name = spec, line = get_line(element(2, hd(TypeSpecs))), origin = code, data = S}. |