swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
function  

unicode.general-category

 
 

Library: Unicode (OMUNICODE)
Import: omunicode.xmd
Return type: String

Returns: The two-letter general category value of the argument character.


Declaration

export string function
   general-category of value integer character
    


Purpose

Use general-category to find the Unicode general category property of a character code point, as defined in Unicode 5.1.0. The following general category values can be returned by this function:

Example

The following pattern function matches a UTF-8 encoded white space character:

  import "omunicode.xmd" prefixed by unicode.
  import "omutf8.xmd" prefixed by utf8.
  
  define switch function
     unicode-whitespace
  as
     return #current-input matches (utf8.char => character
                                    (when unicode.general-category of utf8.code-point of character matches "Z"))

      Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.