Bidi
in package
Com\Tecnick\Unicode\Bidi
Tags
Table of Contents
Methods
- __construct() : mixed
- Reverse the RLT substrings using the Bidirectional Algorithm http://unicode.org/reports/tr9/
- getCharKeys() : array<int, true>
- Returns an array with processed chars as keys
- getChrArray() : array<string|int, string>
- Returns the processed array of UTF-8 chars
- getNumChars() : int
- Returns the number of characters in the processed string
- getOrdArray() : array<string|int, int>
- Returns the processed array of UTF-8 codepoints
- getString() : string
- Returns the processed string
Methods
__construct()
Reverse the RLT substrings using the Bidirectional Algorithm http://unicode.org/reports/tr9/
public __construct([string|null $str
= null
][,
array<string|int,
string>|null $chrarr
= null
][,
array<string|int,
int>|null $ordarr
= null
][,
string $forcedir
= ''
][,
bool $shaping
= true
]) : mixed
Parameters
- $str : string|null = null
-
String to convert (if null it will be generated from $chrarr or $ordarr)
- $chrarr : array<string|int, string>|null = null
-
Array of UTF-8 chars (if empty it will be generated from $str or $ordarr)
- $ordarr : array<string|int, int>|null = null
-
Array of UTF-8 codepoints (if empty it will be generated from $str or $chrarr)
- $forcedir : string = ''
-
If 'R' forces RTL, if 'L' forces LTR
- $shaping : bool = true
-
If true enable the shaping algorithm
getCharKeys()
Returns an array with processed chars as keys
public getCharKeys()
: array<int,
true>
Return values
array<int, true>getChrArray()
Returns the processed array of UTF-8 chars
public getChrArray()
: array<string|int,
string>
Return values
array<string|int, string>getNumChars()
Returns the number of characters in the processed string
public getNumChars()
: int
Return values
intgetOrdArray()
Returns the processed array of UTF-8 codepoints
public getOrdArray()
: array<string|int,
int>
Return values
array<string|int, int>getString()
Returns the processed string
public getString()
: string