Maintainer | [email protected] |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
Data.Char.Tag
Description
Warning: Using tags to convey language tags is strongly discouraged by the Unicode developers.
Unicode has a tags block. This is used to make hidden annotations to specify the language of the text, this is no longer recommended.
Since then this Unicode block has been repurposed as modifiers for region flag emoji. These are used for example in the flag of Scotland
with "\x1f3f4\xe0067\xe0062\xe0073\xe0063\xe0074\xe007f"
where the first character is the emoji of a black flag, the following two
characters are tags for g
, and b
to present Great Brittain, then the following three characters are used to specify the
region where s
, c
and t
are used to specify Scotland and finally the stateful tag terminator to end the Emoji sequence.
Synopsis
- isTag :: Char -> Bool
- isAsciiTag :: Char -> Bool
- hasTagCounterPart :: Char -> Bool
- toTag :: Char -> Maybe Char
- toTags :: String -> Maybe String
- toTag' :: Char -> Char
- toTags' :: String -> String
- fromTag :: Char -> Maybe Char
- fromTag' :: Char -> Char
- fromTags :: String -> Maybe String
- fromTags' :: String -> String
- languageTag :: Char
- cancelTag :: Char
Documentation
Check if the given item is a tag; or has a tag counterpart.
Check if the given Char
is a tag.
Arguments
:: Char | The given |
-> Bool |
|
Check if the given item is a tag for a visible ASCII character.
Arguments
:: Char | The given |
-> Bool |
|
Check if the given Char
acter has a tag counterpart. This
is only the case for visible ASCII characters.
Convert from and to tags.
Arguments
:: String | The given |
-> Maybe String | The string of tags wrapped in a |
Try to convert the given string of characters, to a string of tag characters. If one of the
conversions failed, Nothing
is returned.
Arguments
:: Char | The given |
-> Char | The corresponding tag |
Convert the given Char
acter to the corresponding tag character. If the given
character has no tag counterpart, it is unspecified what will happen.
Constants for two special Unicode codepoints.
A Char
acter that specfies the beginning of the language specification of the text. Since tags should no longer
be used to specify languages, this character is deprecated.