purescript-strings icon indicating copy to clipboard operation
purescript-strings copied to clipboard

split: Add more examples

Open gasi opened this issue 3 years ago • 1 comments

Description of the change

This change adds more examples to the String.split function and fixes a typo (occurences → occurrences).


Checklist:

  • [x] Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • [ ] Linked any existing issues or proposals that this pull request should close
  • [x] Updated or added relevant documentation
  • [x] Added a test for the contribution (if applicable)

gasi avatar Nov 09 '22 18:11 gasi

If you want more examples, you can add

  • adjacent matches:
split (Pattern "b") "abbc" == ["a", "", "c"]
  • overlapping matches:
split (Pattern "bb") "abbbc" == ["a", "bc"]

michaelficarra avatar Nov 11 '22 19:11 michaelficarra