Maintainer | hapytexeu+gh@gmail.com |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
Unicode defines two blocks of enclosed alphanumerical characters. The U2460 block, and the 1F100 block. This module aims to make it more convenient to map numbers, upper case and lower case values to their corresponding enclosed characters.
Synopsis
- numberWithComma :: Int -> Maybe Char
- numberWithComma' :: Int -> Char
- circledAlpha :: Char -> Maybe Char
- circledAlpha' :: Char -> Char
- circledNumber :: Int -> Maybe Char
- circledNumber' :: Int -> Char
- parenthesizedAlpha :: Char -> Maybe Char
- parenthesizedAlpha' :: Char -> Char
- parenthesizedNumber :: Int -> Maybe Char
- parenthesizedNumber' :: Int -> Char
- numberWithPeriod :: Int -> Maybe Char
- numberWithPeriod' :: Int -> Char
- doubleCircledNumber :: Int -> Maybe Char
- doubleCircledNumber' :: Int -> Char
- regionalIndicatorUppercase :: Char -> Maybe Char
- regionalIndicatorUppercase' :: Char -> Char
- squaredUppercase :: Char -> Maybe Char
- squaredUppercase' :: Char -> Char
- whiteOnBlackCircledUppercase :: Char -> Maybe Char
- whiteOnBlackCircledUppercase' :: Char -> Char
- whiteOnBlackSquaredUppercase :: Char -> Maybe Char
- whiteOnBlackSquaredUppercase' :: Char -> Char
- numberWhiteOnBlackCircle :: Int -> Maybe Char
- numberWhiteOnBlackCircle' :: Int -> Char
Numbers with comma
:: Int | The given number to convert. |
-> Char | The corresponding |
Convert the given number to a Char
acter where the number is succeeded by
a comma (,
). If the given number is outside the 0-9
range, the result is
unspecified.
Circled alphanumerical characters
:: Char | The given |
-> Char | The corresponding |
Convert the given upper case or lower case Char
acter to a character that
is circled. If the value is outside the A-Z,a-z
range, the result is
unspecified.
:: Int | The given number to convert. |
-> Char | A character that is the circled variant of the given number. |
Convert the given number to a Char
acter where the number is circled.
This works for numbers in the 0-20
range. For numbers outside this range,
the behavior is unspecified.
Parenthesized alphanumerical characters
:: Char | The given |
-> Char | The corresponding |
Convert the given upper case or lower case character to a Char
acter
where it is parenthesized. If the value is outside the A-Z,a-z
range,
the result is unspecified.
:: Int | The given number to convert. |
-> Char | The corresponding |
Convert the given number to a Char
acter where the number is
parenthesized. If the number is outside the 1-20
range, the result is
unspecified.
Numbers with period
:: Int | The given number to convert. |
-> Char | The corresponding |
Convert the given number to Char
acter where the number is succeeded by a
period (.
). If the number is outside the 0-20
range, the result is
unspecified.
Double circled numbers
:: Int | The given number to convert. |
-> Char | The corresponding |
Convert the given number to a Char
acter where the number is double
circled. If the given number is outside the 1-10
range, the result is
unspecified.
Regional indicators
regionalIndicatorUppercase Source #
:: Char | The given |
-> Maybe Char | The corresponding |
Convert the given upper case character to a regional indicator character.
The result is wrapped in a Just
data constructor. If the value is outside
the A-Z
range, Nothing
is returned. The regional indicators are used for
flag emojis. Two consecutive regional indicators that together form an ISO
63166 Alpha-2 code, then this will result in the corresponding flag Emoji.
Deprecated countries like the Soviet Union (SU) and Yugoslavia (YU) do not
have a flag emoji. Antarctica (AQ), the European Union (EU) and the United
Nations (UN) have a flag emoji.
regionalIndicatorUppercase' Source #
:: Char | The given |
-> Char | The corresponding |
Convert the given upper case character to a regional indicator character.
If the value is outside the A-Z
range, the result is unspecified.
The regional indicators are used for flag emojis. Two consecutive regional indicators that together form an ISO 63166 Alpha-2 code, then this will result in the corresponding flag Emoji. Deprecated countries like the Soviet Union (SU) and Yugoslavia (YU) do not have a flag emoji. Antarctica (AQ), the European Union (EU) and the United Nations (UN) have a flag emoji.
Squared Latin letters
:: Char | The given |
-> Char | The corresponding |
Convert the given upper case character to a Char
acter where it is squared
(put in a square box). If the value is outside the A-Z
range, the result is
unspecified.
White on black circled Latin letters
whiteOnBlackCircledUppercase' Source #
:: Char | The given |
-> Char | The corresponding |
Convert the given upper case character to a character where the character
is written in white on a black circle. If the given value is outside the
A-Z
range, the result is unspecified.
White on black squared Latin letters
whiteOnBlackSquaredUppercase' Source #
:: Char | The given |
-> Char | The corresponding |
Convert the given upper case character to a character where the character
is written in white on a black square. If the given value is outside the
A-Z
range, the result is unspecified.
White numbers on a black circle
numberWhiteOnBlackCircle' Source #
:: Int | The given number to convert. |
-> Char | The corresponding |
Convert the given number to a character where the number is written in
white on a black circle. If the given value is outside the 0,11-20
range,
the result is unspecified.