What is the better way to convert a given Char
to lowercase version?
One method could be with converting to String
:
charToLower :: Char -> Char
charToLower char =
Maybe.fromMaybe char
$ CodeUnits.charAt 0
$ String.toLower
$ CodeUnits.singleton char
Is there a more appropriate way in terms of performance/simplicity?
There is also a toLower` from CodePoint.Unicode package but I wonder if it is a preferred way.