benemohamed / unicodeblock
Unicode block checker Check if the string is in some Unicode block with full block Character and block {form..to} , Unicode name
Installs: 6 710
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^7.1 || ^8.0
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ^8.2.2
- squizlabs/php_codesniffer: ^3.4.2
This package is auto-updated.
Last update: 2024-11-22 22:09:26 UTC
README
Check if the string is in some Unicode block with full block Character and block {form..to} , Unicode name
Requirements
- PHP >= 7.0
- JSON PHP mbstring
Install
composer require benemohamed/Unicodeblock
Usage
<?php // Import Unicodeblock use Benemohamed\Unicodeblock\UnicodeBlock; var_dump(UnicodeBlock::Arabic('يبيسب')); /* -- outputs: array(5) { 'is' => bool(true) 'block1' => int(1536) 'block2' => int(1791) 'Unicode_name' => string(6) "Arabic" 'check_list' => array(1) { [0] => array(255) { (more elements)... (more elements)... [118] => string(2) "ٶ" [119] => string(2) "ٷ" [120] => string(2) "ٸ" [121] => string(2) "ٹ" [122] => string(2) "ٺ" [123] => string(2) "ٻ" [124] => string(2) "ټ" [125] => string(2) "ٽ" [126] => string(2) "پ" [127] => string(2) "ٿ" (more elements)... (more elements)... } } } */
All methods return a array
List methods
<?php use Benemohamed\Unicodeblock\UnicodeBlock; var_dump(get_class_methods(UnicodeBlock::class));
Supported all Unicode Block
Total Block and methods is: 280
Running the tests
composer test
Data
data Unicode blocks Source