purescript-strings
purescript-strings copied to clipboard
split: Add more examples
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)
If you want more examples, you can add
- adjacent matches:
split (Pattern "b") "abbc" == ["a", "", "c"]
- overlapping matches:
split (Pattern "bb") "abbbc" == ["a", "bc"]