Table of contents
Namespace: Com\Tecnick\Unicode
final class Substitution
Source: src/Substitution.php:43
Context-sensitive Unicode character substitution.
Detects which scripts are present in the codepoint array in a single pass, then applies the matching per-script handlers in sequence: Thai, Devanagari, Hangul. Codepoints of unsupported scripts are passed through unmodified.
Methods
replaceChars()
Applies script-specific character substitutions to the codepoint array.
Empty input is returned unchanged.
public replaceChars(array<int,int> $ordarr): array<int,int>
Parameters:
$ordarr(array<int,int>): Array of Unicode codepoints.
Returns: array<int,int>: Transformed codepoint array.
Source: src/Substitution.php:53