15 public static function character($character): string
19 if (!is_numeric($character)) {
23 $character = (int) $character;
24 if ($character < 1 || $character > 255) {
28 return iconv(
'UCS-4LE',
'UTF-8', pack(
'V', $character));
38 public static function code($characters)
40 if (($characters === null) || ($characters ===
'')) {
44 if (is_bool($characters)) {
45 $characters = self::convertBooleanValue($characters);
48 $character = $characters;
49 if (mb_strlen($characters,
'UTF-8') > 1) {
50 $character = mb_substr($characters, 0, 1,
'UTF-8');
53 return self::unicodeToOrd($character);
58 return unpack(
'V', iconv(
'UTF-8',
'UCS-4LE', $character))[1];
static convertBooleanValue($value)
static unicodeToOrd($character)
static character($character)
CHARACTER.
static getFALSE()
Return the locale-specific translation of FALSE.
const COMPATIBILITY_OPENOFFICE
static getTRUE()
Return the locale-specific translation of TRUE.
static code($characters)
ASCIICODE.
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
static getCompatibilityMode()
Return the current Compatibility Mode.