File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -357,9 +357,10 @@ defmodule String do
357
357
358
358
@ doc ~S"""
359
359
Divides a string into substrings at each Unicode whitespace
360
- occurrence with leading and trailing whitespace ignored. Groups
361
- of whitespace are treated as a single occurrence. Divisions do
362
- not occur on non-breaking whitespace.
360
+ occurrence with leading and trailing whitespace ignored.
361
+
362
+ Groups of whitespace are treated as a single occurrence.
363
+ Divisions do not occur on non-breaking whitespace.
363
364
364
365
## Examples
365
366
@@ -375,6 +376,11 @@ defmodule String do
375
376
iex> String.split("no\u00a0break")
376
377
["no\u00a0break"]
377
378
379
+ Removes empty strings, like when using `trim: true` in `String.split/3`.
380
+
381
+ iex> String.split(" ")
382
+ []
383
+
378
384
"""
379
385
@ spec split ( t ) :: [ t ]
380
386
defdelegate split ( binary ) , to: String.Break
You can’t perform that action at this time.
0 commit comments