Next: , Previous: , Up: Unicode character classification and properties <unictype.h>   [Contents][Index]


8.12 Blocks

The Unicode characters are subdivided into blocks. A block is an interval of Unicode code points.

The following type is used to represent a block.

Type: uc_block_t

This data type is a structure type that refers to statically allocated data. It contains the following fields:

ucs4_t start;
ucs4_t end;
const char *name;

The start field is the first Unicode code point in the block.

The end field is the last Unicode code point in the block.

The name field is the name of the block.

The following function looks up a block.

Function: const uc_block_t * uc_block (ucs4_t uc)

Returns the block a character belongs to.

The following function views a block as a set of Unicode characters.

Function: bool uc_is_block (ucs4_t uc, const uc_block_t *block)

Tests whether a Unicode character belongs to a given block.

The following gives a global picture of all block.

Function: void uc_all_blocks (const uc_block_t **blocks, size_t *count)

Get the list of all blocks. Stores a pointer to an array of all blocks in *blocks and the length of this array in *count.