Elixir 1.3.0: String.strip/1 and String.strip/2 API documentation missing.

可紊 提交于 2019-12-13 12:26:17

问题


It seems that Elixir 1.3.0 doesn't show anymore the documentation for String.strip/1 and String.strip/2:

iex(1)> h String.strip
No documentation for String.strip was found

they are missing also in the current online documentation (v1.3, Master, Stable), but the functions are still recognized by the compiler:

iex(2)> String.strip("   Hallo, World!   ")
"Hallo, World!"

So I'm wondering if this is just a bug in String documentation, or if these functions are going to become deprecated. I can't find any better information googling.


回答1:


These functions have been soft deprecated. This means they have been marked as @doc false. Currently the plan is to deprecate with warnings by 1.5.

https://github.com/elixir-lang/elixir/blob/v1.3/CHANGELOG.md#3-soft-deprecations-no-warnings-emitted

[String] The confusing String.strip/2, String.lstrip/2 and String.rstrip/2 API has been soft deprecated in favor of String.trim/2, String.trim_leading/2 and String.trim_trailing/2



来源:https://stackoverflow.com/questions/38073326/elixir-1-3-0-string-strip-1-and-string-strip-2-api-documentation-missing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!