Environment
- Elixir version (elixir -v): v 1.3.2
- Operating system: OSX
Current behavior
When try to trim a string with "":
iex> String.trim("abc", "")
iex> String.trim_leading("abc", "")
iex> String.trim_trailing("abc", "")
The iex will stunned, and didn't raise any error.
Expected behavior
iex> String.trim("abc", "")
iex> "abc"
It's reasonable that we can't use String.replace("abc", "", ""). But I think when we trim a string with "", that should return string itself.
What do you think of?
Environment
Current behavior
When try to trim a string with "":
iex> String.trim("abc", "")iex> String.trim_leading("abc", "")iex> String.trim_trailing("abc", "")The iex will stunned, and didn't raise any error.
Expected behavior
It's reasonable that we can't use
String.replace("abc", "", ""). But I think when we trim a string with "", that should return string itself.What do you think of?