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

unicode.block-name

 
 

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

Returns: The name of the argument character's Unicode block.


Declaration

export string function
   block-name of value integer character
    


Purpose

Use block-name to find the block property of a character code point, as defined in Unicode 5.1.0.

The pattern function greek in the following example demonstrates how to use the block-name function to match a Greek combined character:

  import "omunicode.xmd" prefixed by unicode.
  import "omutf8.xmd" prefixed by utf8.
  
  define switch function
     greek
  as
     repeat scan #current-input
     match utf8.char => character
           (when unicode.block-name of utf8.code-point of character matches "Combining Diacritical Marks")
     match utf8.char => character
           (when unicode.block-name of utf8.code-point of character = ("Greek and Coptic" | "Greek Extended"))
        return true
     again
  
     return false

      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.