ideea/unicode

Utils for work with unicode strings

v1.0 2014-05-22 13:34 UTC

This package is auto-updated.

Last update: 2020-12-27 08:59:29 UTC


README

Utilities for work with unicode characters

Installation

Add Unicide util to your composer.json:

{
    "require": {
        "ideea/unicode": "~1.0"
    }
}

Now tell composer to download the library by running the command:

$ php composer.phar update "ideea/unicode"

Work with util

Get char code:

<?php

use Ideea\Unicode\Unicode;

$char = 'a'; // Or another char

$charCode = Unicode::ord($char);

Get char codes from string:

<?php

use Ideea\Unicode\Unicode;

$string = 'foo-bar';

$charCodes = Unicode::ordStr($string);

Attention: the chars must be encoding in UTF-8!

License

This library is under the MIT license. See the complete license in library

LICENSE

Reporting an issue or a feature request

Issues and feature requests are tracked in the GitHub issue tracker