$array = ASCII::charsArray(); var_dump($array['ru']['б']); // 'b'
Add some more replacements e.g. "£" with " pound ".
$array = ASCII::charsArrayWithMultiLanguageValues(); var_dump($array['b']); // ['β', 'б', 'ဗ', 'ბ', 'ب']
An array of replacements.
$array = ASCII::charsArrayWithOneLanguage('ru'); $tmpKey = \array_search('yo', $array['replace']); echo $array['orig'][$tmpKey]; // 'ё'
Language of the source string e.g.: en, de_at, or de-ch. (default is 'en') | ASCII::*_LANGUAGE_CODE
TRUE === return {orig: string[], replace: string[]} array
$array = ASCII::charsArrayWithSingleLanguageValues(); $tmpKey = \array_search('hnaik', $array['replace']); echo $array['orig'][$tmpKey]; // '၌'
The string to be sanitized.
Set to true, if you need to normalize the whitespace.
Set to true, to keep non-breaking-spaces, in combination with $normalize_whitespace
Set to true, if you need to normalize MS Word chars e.g.: "…" => "..."
Set to false, if you not want to remove invisible characters e.g.: "\0"
A clean UTF-8 string.
ASCII::is_ascii('白'); // false
The string to check.
true if it is ASCII false otherwise
ASCII::normalize_msword('„Abcdef…”'); // '"Abcdef..."'
The string to be normalized.
A string with normalized characters for commonly used chars in Word documents.
ASCII::normalize_whitespace("abc-\xc2\xa0-öäü-\xe2\x80\xaf-\xE2\x80\xAC", true); // "abc-\xc2\xa0-öäü- -"
Set to true, to keep non-breaking-spaces.
Set to true, to keep non-printable (for the web) bidirectional text chars.
Set to true, to convert LINE and PARAGRAPH SEPARATOR with "\n".
A string with normalized whitespace.
ASCII::to_ascii('�Düsseldorf�', 'en'); // Dusseldorf
The input string.
Language of the source string. (default is 'en') | ASCII::*_LANGUAGE_CODE
Whether or not to remove the unsupported characters.
Use ASCII::to_transliterate() for unknown chars.
Single char replacement is better for the performance, but some languages need to replace more then one char at the same time. | NULL === auto-setting, depended on the language
A string that contains only ASCII characters.
ASCII::to_filename('שדגשדג.png', true)); // 'shdgshdg.png'
ASCII::to_transliterate() is used by default - unsafe characters are simply replaced with hyphen otherwise.
A string that contains only safe characters for a filename.
The string used to replace whitespace.
A map of replaceable strings.
Use "string to lower" for the input.
A string that has been converted to an URL slug.
ASCII::to_transliterate('déjà σσς iıii'); // 'deja sss iiii'
Character use if character unknown. (default is '?') But you can also use NULL to keep the unknown chars.
Use "transliterator_transliterate()" from PHP-Intl` **Return:** - `string
A String that contains only ASCII characters.