miniBill/elm-unicode/1.0.2

NOTE: the latest version is 1.1.2

Unicode

Unicode aware functions for working with characters.

Letters

isUpper : Char -> Bool

Detect upper case characters (Unicode category Lu)

isLower : Char -> Bool

Detect lower case characters (Unicode category Ll)

isAlpha : Char -> Bool

Detect letters (Unicode categories Lu, Ll, Lt, Lm, Lo)

isAlphaNum : Char -> Bool

Detect letters or digits (Unicode categories Lu, Ll, Lt, Lm, Lo, Nd, Nl, No)

Digits

isDigit : Char -> Bool

Detect digits (Unicode categories Nd, Nl, No)

Categories

= LetterUppercase
| LetterLowercase
| LetterTitlecase
| MarkNonSpacing
| MarkSpacingCombining
| MarkEnclosing
| NumberDecimalDigit
| NumberLetter
| NumberOther
| SeparatorSpace
| SeparatorLine
| SeparatorParagraph
| OtherControl
| OtherFormat
| OtherSurrogate
| OtherPrivateUse
| OtherNotAssigned
| LetterModifier
| LetterOther
| PunctuationConnector
| PunctuationDash
| PunctuationOpen
| PunctuationClose
| PunctuationInitialQuote
| PunctuationFinalQuote
| PunctuationOther
| SymbolMath
| SymbolCurrency
| SymbolModifier
| SymbolOther

A category as defined by the Unicode standard.

getCategory : Char -> Maybe Category

Get the Unicode category. Warning: this function is very big. You should usually use one of the isXXX ones instead.

categoryFromString : String -> Maybe Category

Parses a category name (Lu, Ll, Lt, ...).

Convert a category to its short category name (Lu, Ll, Lt, ...)

Converts a category to its English description. Mostly useful for debugging purposes.