Uppercase/lowercase on Char, tests, and more#41
Uppercase/lowercase on Char, tests, and more#41garyb merged 2 commits intopurescript:masterfrom LiamGoodacre:master
Conversation
Added * `Data.Char.toUpperChar :: Char -> Char` * `Data.Char.toLowerChar :: Char -> Char` Removed * `Data.Char.showChar :: Show Char` - collided with `showChar` defined in the prelude?
|
Removing |
|
How about just |
|
Originally I went with However, I am happy to rename if you're okay with that 😃 |
Testing
--
* Added `test/` directory.
* Added `pulp test` to the `build` script.
* New dev dependencies `purescript-assert` and `purescript-console`
Breaking changes
--
* `Data.String.Regex.search` now gives back `Maybe Int`.
* `Nothing` for no match instead of `-1`.
* `Data.Char.toUpperChar` is now `Data.Char.toUpper`.
* `Data.Char.toLowerChar` is now `Data.Char.toLower`.
Bug fixes
--
* `Data.String.indexOf'` wrong for index out of bounds.
* `Data.String.lastIndexOf'` wrong for index out of bounds.
* `Data.String.localeCompare` off by 1.
Notes
--
The vast majority of functions have at least one test case.
Lots of room for more though, especially in `Data.String.Regex`!
Tests could also be added for checking that the unsafe functions throw in the documented ways.
|
Looks great to me 👍 |
|
I've not merged this yet, as doing so will potentially unleash chaos when we bump the version 😄 I have a tool that I need to finish up that will allow us to bump all the dependencies together, once that's working I'll merge/release this. And thanks! |
|
It's not too heavily depended-on actually, but even still, I'd rather use the tool to do it:
|
Uppercase/lowercase on Char, tests, and more
|
Thanks for your work on this, sorry it took so long to get merged. |
Added
Data.Char.toUpperChar :: Char -> CharData.Char.toLowerChar :: Char -> CharRemoved
Data.Char.showChar :: Show CharshowChardefined in the prelude?Is this okay?
docs/Data.String.mdchanged when I generated the docs, someone didn't regenerate them last time I guess?