unicode-tricks-0.14.1.0: Functions to work with unicode blocks more convenient.
Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Data.Char.Enclosed

Description

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

Numbers with comma

numberWithComma Source #

Arguments

:: Int

The given number to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given number to a Character where the number is succeeded by a comma (,). The result is wrapped in a Just data constructor. If the given number is outside the 0-9 range, Nothing is returned.

numberWithComma' Source #

Arguments

:: Int

The given number to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

Convert the given number to a Character 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

circledAlpha Source #

Arguments

:: Char

The given Character to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given upper case or lower case Character to a character that is circled. The result is wrapped in a Just data constructor. If the value is outside the A-Z,a-z range, Nothing is returned.

circledAlpha' Source #

Arguments

:: Char

The given Character to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

Convert the given upper case or lower case Character to a character that is circled. If the value is outside the A-Z,a-z range, the result is unspecified.

circledNumber Source #

Arguments

:: Int

The given number to convert.

-> Maybe Char

A Character that is circled variant of the given number wrapped in a Just data constructor if it exists; Nothing otherwise.

Convert the given number to a Character where the number is circled wrapped in a Just. This works for numbers in the 0-20 range. For numbers outside this range Nothing is returned.

circledNumber' Source #

Arguments

:: Int

The given number to convert.

-> Char

A character that is the circled variant of the given number.

Convert the given number to a Character 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

parenthesizedAlpha Source #

Arguments

:: Char

The given Character to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given upper case or lower case Character to a Character where it is parenthesized. The result is wrapped in a Just data constructor. If the value is outside the A-Z,a-z range, Nothing is returned.

parenthesizedAlpha' Source #

Arguments

:: Char

The given Character to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

Convert the given upper case or lower case character to a Character where it is parenthesized. If the value is outside the A-Z,a-z range, the result is unspecified.

parenthesizedNumber Source #

Arguments

:: Int

The given number to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given number to a Character where the number is parenthesized wrapped in a Just data constructor. If the number is outside the 1-20 range, Nothing is returned.

parenthesizedNumber' Source #

Arguments

:: Int

The given number to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

Convert the given number to a Character where the number is parenthesized. If the number is outside the 1-20 range, the result is unspecified.

Numbers with period

numberWithPeriod Source #

Arguments

:: Int

The given number to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given number to a Character where the number is succeeded by a period (.) wrapped in a Just data constructor. If the number is outside the 0-20 range, Nothing is returned.

numberWithPeriod' Source #

Arguments

:: Int

The given number to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

Convert the given number to Character where the number is succeeded by a period (.). If the number is outside the 0-20 range, the result is unspecified.

Double circled numbers

doubleCircledNumber Source #

Arguments

:: Int

The given number to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given number to a Character where the number is double circled. The result is wrapped in a Just data constructor. If the given number is outside the 1-10 range, Nothing is returned.

doubleCircledNumber' Source #

Arguments

:: Int

The given number to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

Convert the given number to a Character where the number is double circled. If the given number is outside the 1-10 range, the result is unspecified.

Regional indicators

regionalIndicatorUppercase Source #

Arguments

:: Char

The given Character to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

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 #

Arguments

:: Char

The given Character to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

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

squaredUppercase Source #

Arguments

:: Char

The given Character to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given upper case character to a Character where it is squared (put in a square box). The result is wrapped in a Just data constructor. If the value is outside the A-Z range, Nothing is returned.

squaredUppercase' Source #

Arguments

:: Char

The given Character to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

Convert the given upper case character to a Character 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 #

Arguments

:: Char

The given Character to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given upper case character to a character where the character is written in white on a black circle. The result is wrapped in a Just data constructor. If the given value is outside the A-Z range, Nothing is returned.

whiteOnBlackCircledUppercase' Source #

Arguments

:: Char

The given Character to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

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 #

Arguments

:: Char

The given Character to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given upper case character to a character where the character is written in white on a black square. The result is wrapped in a Just data constructor. If the given value is outside the A-Z range, Nothing is returned.

whiteOnBlackSquaredUppercase' Source #

Arguments

:: Char

The given Character to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

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 #

Arguments

:: Int

The given number to convert.

-> Maybe Char

The corresponding Character wrapped in a Just data constructor. If outside the range, Nothing.

Convert the given number to a character where the number is written in white on a black circle. The result is wrapped in a Just data constructor. If the given value is outside the 0,11-20 range, Nothing is returned.

numberWhiteOnBlackCircle' Source #

Arguments

:: Int

The given number to convert.

-> Char

The corresponding Character. If outside the range, unspecified result.

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.