-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Unicode characters names and aliases -- -- unicode-data-names provides Haskell APIs to access the -- Unicode character names and aliases from the Unicode -- character database (UCD). -- -- The Haskell data structures are generated programmatically from the -- UCD files. The latest Unicode version supported by this library is -- 15.1.0. @package unicode-data-names @version 0.4.0 module Unicode.Internal.Char.Label -- | Returns the label of a code point if it has no character name, -- otherwise returns "UNDEFINED". -- -- See subsection “Code Point Labels” in section 4.8 “Name” of the -- Unicode Standard. label :: Char -> IO CStringLen -- | Appned the code point of a character using the Unicode Standard -- convention: hexadecimal codepoint padded with zeros if inferior to 4 -- characters. -- -- It is the responsability of the caller to provide a CString -- that can hold up to 6 characters from the provided index. addHexCodePoint :: CString -> Int# -> Int# -> Char -> IO Int -- | Convert an Int# in the range 0..15 to the corresponding single -- digit CChar in upper case. -- -- Undefined for numbers outside the 0..15 range. intToDigiT :: Int# -> CChar -- | Unicode character names and name aliases with String API. See -- Unicode standard 15.0.0, section 4.8. -- -- There are also two optional APIs: -- -- module Unicode.Char.General.Names -- | Version of the Unicode standard used by this package: 15.1.0. unicodeVersion :: Version -- | Name of a character, if defined. name :: Char -> Maybe String -- | Returns a character’s name if defined, otherwise returns its -- first name alias if defined. nameOrAlias :: Char -> Maybe String -- | Returns a character’s name if defined, otherwise returns its -- label between angle brackets. nameOrLabel :: Char -> String -- | Returns corrected name of a character (see Correction), -- if defined, otherwise returns its original name if defined. correctedName :: Char -> Maybe String -- | Type of name alias. See Unicode Standard 15.0.0, section 4.8. data NameAliasType -- | Corrections for serious problems in the character names. Correction :: NameAliasType -- | ISO 6429 names for C0 and C1 control functions, and -- other commonly occurring names for control codes. Control :: NameAliasType -- | A few widely used alternate names for format characters. Alternate :: NameAliasType -- | Several documented labels for C1 control code points which -- were never actually approved in any standard. Figment :: NameAliasType -- | Commonly occurring abbreviations (or acronyms) for control codes, -- format characters, spaces, and variation selectors. Abbreviation :: NameAliasType -- | All name aliases of a character, if defined. The names are listed in -- the original order of the UCD. -- -- See nameAliasesWithTypes for the detailed list by alias type. nameAliases :: Char -> [String] -- | Name aliases of a character for a specific name alias type. nameAliasesByType :: NameAliasType -> Char -> [String] -- | Detailed character names aliases. The names are listed in the original -- order of the UCD. -- -- See nameAliases if the alias type is not required. nameAliasesWithTypes :: Char -> [(NameAliasType, [String])] -- | Returns the label of a code point if it has no character name, -- otherwise returns "UNDEFINED". -- -- See subsection “Code Point Labels” in section 4.8 “Name” of the -- Unicode Standard. -- --
--   >>> label '\0'
--   "control-0000"
--   
--   >>> label 'a'
--   "UNDEFINED"
--   
--   >>> label '\xffff'
--   "noncharacter-FFFF"
--   
label :: Char -> String