Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 899 Bytes

README.md

File metadata and controls

47 lines (30 loc) · 899 Bytes

unicode

A PHP library with all unicode blocks. For every block the library contains the English and the German name as well as the start and end value and the regex pattern to match the block.

composer require zepi/unicode

Usage

To use the library, use the following options:

a) Use the UnicodeIndex

<?php

require_once(__DIR__ . '/vendor/autoload.php');

use zepi\Unicode\UnicodeIndex;

$unicodeIndex = new UnicodeIndex();

// Get all blocks
var_dump($unicodeIndex->getIndex());

// Get a block by key
var_dump($unicodeIndex->getBlockByKey('BasicLatin'));

b) Initialize the block directly

<?php

require_once(__DIR__ . '/vendor/autoload.php');

use zepi\Unicode\Block\BasicLatinBlock;

$basicLatinBlock = new BasicLatinBlock();

var_dump($basicLatinBlock);

License

MIT (see LICENSE)

Copyright

Copyright 2022 Matthias Zobrist