elixir-lang/elixir — pull request #1651 by vanstee (2013-08-26 01:44:28+00:00)
Title: Add support for `trim` option to `String.split` and `Regex.split`

To support the trim option I had to reimplement `split` to remove all empty strings from the result.

Here's an example:

```elixir
iex> String.split(" a b c ", " ", trim: false)
["", "a", "b", "c", ""]
iex> String.split(" a b c ", " ", trim: true)
["a", "b", "c"]
```