Skip to content

Commit

Permalink
Str: split: add splitting the empty string as example
Browse files Browse the repository at this point in the history
  • Loading branch information
rudis committed Feb 29, 2016
1 parent 38f902a commit 45447c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/Type/Str.pod
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ Examples:
say split(<; ,>, "a;b;c,d", :k).perl # ("a", 0, "b", 0, "c", 1, "d")
say split(<; ,>, "a;b;c,d", :kv).perl # ("a", 0, ";", "b", 0, ";", "c", 1, ",", "d")
say "".split("x").perl # ("",)
say "".split("x", :skip-empty).perl # ("",)
say "abcde".split("").perl # ("", "a", "b", "c", "d", "e", "")
say "abcde".split("",:skip-empty).perl # ("a", "b", "c", "d", "e")
Expand Down

0 comments on commit 45447c7

Please sign in to comment.