2024 日本 PHP 研討會

UConverter 類別

(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)

簡介

類別概要

class UConverter {
/* 常數 */
public const int REASON_UNASSIGNED;
public const int REASON_ILLEGAL;
公開 const 整數 REASON_IRREGULAR
公開 const 整數 REASON_RESET
公開 const 整數 REASON_CLOSE
公開 const 整數 REASON_CLONE
公開 const 整數 UNSUPPORTED_CONVERTER
公開 const 整數 SBCS
公開 const 整數 DBCS
公開 const 整數 MBCS
公開 const 整數 LATIN_1
公開 const 整數 UTF8
公開 const 整數 UTF16_BigEndian
公開 const 整數 UTF16_LittleEndian
公開 const 整數 UTF32_BigEndian
公開 const 整數 UTF32_LittleEndian
公開 const 整數 EBCDIC_STATEFUL
公開 const 整數 ISO_2022
公開 const 整數 LMBCS_1
公開 常數 整數 LMBCS_2;
公開 常數 整數 LMBCS_3;
公開 常數 整數 LMBCS_4;
公開 常數 整數 LMBCS_5;
公開 常數 整數 LMBCS_6;
公開 常數 整數 LMBCS_8;
公開 常數 整數 LMBCS_11;
公開 常數 整數 LMBCS_16;
公開 常數 整數 LMBCS_17;
公開 常數 整數 LMBCS_18;
公開 常數 整數 LMBCS_19;
公開 常數 整數 LMBCS_LAST;
公開 常數 整數 HZ;
公開 常數 整數 SCSU;
公開 常數 整數 ISCII;
公開 常數 整數 US_ASCII;
公開 常數 整數 UTF7;
公開 常數 整數 BOCU1;
公開 常數 整數 UTF16;
公開 常數 整數 UTF32;
公開 const int CESU8;
公開 const int IMAP_MAILBOX;
/* 方法 */
公開 __construct(?string $destination_encoding = null, ?string $source_encoding = null)
公開 convert(string $str, bool $reverse = false): string|false
公開 fromUCallback(
    int $reason,
    array $source,
    int $codePoint,
    int &$error
): string|int|array|null
公開 靜態 getAliases(string $name): array|false|null
公開 靜態 getAvailable(): array
公開 getErrorCode(): 整數
公開 靜態 getStandards(): ?陣列
公開 靜態 reasonText(整數 $reason): 字串
公開 setSourceEncoding(字串 $encoding): 布林值
公開 setSubstChars(字串 $chars): 布林值
公開 toUCallback(
    int $reason,
    字串 $source,
    字串 $codeUnits,
    int &$error
): string|int|array|null
公開 靜態 transcode(
    字串 $str,
    字串 $toEncoding,
    字串 $fromEncoding,
    ?陣列 $options = null
): 字串|false
}

更新日誌

版本 說明
8.4.0 類別常數現在已設定類型。

目錄

新增註記

使用者貢獻的註記

此頁面沒有使用者貢獻的註記。
To Top