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

Data.Char.Control

Description

Unicode has a block named Control Pictures that visualizes control characters such as NULL, SUB, LF, DEL, etc. This module aims to make it more convenient to convert the control characters to their visualization and vice versa. Only ASCII control characters and the space are supported.

Synopsis

Conversion to control pictures

controlPicture Source #

Arguments

:: Char

The given control Char to convert.

-> Maybe Char 

Convert the given control Char to a Char that visualizes that characters. This is sometimes done by diagonal lettering of the characters denoting the control character. If the given Char is not a control character, Nothing is returned.

controlPicture' Source #

Arguments

:: Char

The given control Char.

-> Char

The corresponding Char that visualizes the control Char.

Convert the given control Char to a Char that visualizes that character. If the given Char is not a control character, it is unspecified what happens.

convertToControlPictures Source #

Arguments

:: Text

The given Text where we want to convert control characters to their control picture characters.

-> Text

The corresponding Text where the control characters are converted to their control picture characters.

Convert the given Text to a Text object where the control characters that have in Unicode a control picture block item.

Conversion from control picturesa

fromControlPicture Source #

Arguments

:: Char

The given visualization of control Char.

-> Maybe Char

The corresponding control Char wrapped in a Just if the given character is the visualization of a control character; otherwise Nothing.

Convert the given visualization of a control Char to that control Char wrapped in a Just. If the given Char is not a visualization of a control character, Nothing is returned.

fromControlPicture' Source #

Arguments

:: Char

The given visualization of control Char.

-> Char

The corresponding control Char.

Convert the given visualization of a control Char to that control Char. If the given Char is not a visualization of a control character, it is unspecified what happens.

Check if a Char is a control Char

isAsciiControl Source #

Arguments

:: Char

The given Char to check.

-> Bool

True if the given Char is a control character in the ASCII range; otherwise False.

Check if the given Char is a control character in the ASCII range.

isControl :: Char -> Bool #

Selects control characters, which are the non-printing characters of the Latin-1 subset of Unicode.

hasControlVisualization Source #

Arguments

:: Char

The given Char to check.

-> Bool

True if the given control character can be visualized; False otherwise.

Check if for the given Char there is a visualization.

Alternative characters

blankSymbol Source #

Arguments

:: Char

Another character for space.

Another symbol used to denote a space that works with . The controlPicture function uses .

openBox Source #

Arguments

:: Char

Another character for space.

Another symbol used to denote a space that works with . The controlPicture function uses .

newLine Source #

Arguments

:: Char

Another character for a new line.

Another symbol used to denote a new line that works with . The control picture function uses .

alternativeDelete Source #

Arguments

:: Char

Another character for delete.

Another symbol used to denote a delete character that works with . The control picture function uses .

alternativeSubstitute Source #

Arguments

:: Char

Another character for substitute.

Another symbol used to denote a substitute character that works with . The control picture function uses .