|
|||||
|
||||||
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. |
export string function block-name of value integer character
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
|
Copyright © Stilo International plc, 1988-2010.