Unicode.Char.Case.Compat

unicode-data-0.3.0: Access Unicode character database

Copyright | (c) 2020 Composewell Technologies and Contributors
License | Apache-2.0
Maintainer | streamly@composewell.com
Stability | experimental
Safe Haskell | Safe-Inferred
Language | Haskell2010

Unicode.Char.Case.Compat

Contents

- Predicates
- Case conversion

Description

Compatibility module for case and case mapping related functions..

The functions of this module are drop-in replacement for those in Data.Char. They are similar but not identical to some functions in Unicode.Char.Case, therefore they are placed in a separate module in order to avoid ambiguity.

Synopsis

- isUpper :: Char -> Bool
- isLower :: Char -> Bool
- toUpper :: Char -> Char
- toLower :: Char -> Char
- toTitle :: Char -> Char

# Predicates

isUpper :: Char -> Bool #

Selects upper-case or title-case alphabetic Unicode characters (letters). Title case is used by a small number of letter ligatures like the single-character form of Lj.

    isUpper c == Data.Char.isUpper c

Since: 0.3.0

isLower :: Char -> Bool #

Selects lower-case alphabetic Unicode characters (letters).

    isLower c == Data.Char.isLower c

Since: 0.3.0

# Case conversion

toUpper :: Char -> Char #

Convert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.

    toUpper c == Data.Char.toUpper c

Since: 0.3.0

toLower :: Char -> Char #

Convert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.

    toLower c == Data.Char.toLower c

Since: 0.3.0

toTitle :: Char -> Char #

Convert a letter to the corresponding title-case or upper-case letter, if any. (Title case differs from upper case only for a small number of ligature letters.) Any other character is returned unchanged.

    toTitle c == Data.Char.toTitle c

Since: 0.3.0