unicode-tricks-0.8.0.0: Functions to work with unicode blocks more convenient.

Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Data.Char.Number.Duodecimal

Contents

Description

The 2150 unicode block contains two characters for duodecimal numbers: numbers with base 12.

In order to represent digits for 10 and 11, unicode has two codepoints: TURNED DIGIT TWO, and TURNED DIGIT THREE. This module makes it more convenient to convert an Integral number to these digits, as well as converting a number to its duodecimal representation.

Synopsis

Characters used for duodecimal numbers

char10 Source #

Arguments

:: Char

A character used in duodecimal numbers to denote 10.

The character used to denote 10: .

char11 Source #

Arguments

:: Char

A character used in duodecimal numbers to denote 11.

The character used to denote 11: .

Convert values to digits

duodecimalDigit :: Integral i => i -> Maybe Char Source #

Convert the given Integral number to its unicode character wrapped in a Just data constructor. In case the value is less than 0 or greater than 11, Nothing is returned.

duodecimalDigit' Source #

Arguments

:: Integral i 
=> i

The given number to convert.

-> Char

A unicode character that represents this digit.

Convert the given Integral number to its unicode character. In case the value is less than 0, or greater than 11, the behavior is unspecified.

Convert value to a sequence of digits

duodecimalNumber Source #

Arguments

:: Integral i 
=> PlusStyle

The given PlusStyle to use.

-> i

The given number to convert.

-> Text

A string of unicode characters representing the value in duodecimal notation.

Convert the given Integral number to a Text object that contains a sequence of duodecimal digits that represent that number. The given PlusStyle specifies if the number is prefixed with + if it is positive.

duodecimalNumber' Source #

Arguments

:: Integral i 
=> i

The given number to convert.

-> Text

A string of unicode characters representing the value in duodecimal notation.

Convert the given Integral number to a Text object that contains sequence of duodecimal digits that represent that number.