PHP Класс pocketmine\utils\TextFormat

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
clean ( string $string, boolean $removeFormat = true ) : mixed Cleans the string from Minecraft codes and ANSI Escape Codes
toANSI ( $string ) : string Returns a string with colorized ANSI Escape codes
toHTML ( string | array $string ) : string Returns an HTML-formatted string with colors/markup
toJSON ( string | array $string ) : string Returns an JSON-formatted string with colors/markup
tokenize ( string $string ) : array Splits the string by Format tokens

Описание методов

clean() публичный статический Метод

Cleans the string from Minecraft codes and ANSI Escape Codes
public static clean ( string $string, boolean $removeFormat = true ) : mixed
$string string
$removeFormat boolean
Результат mixed

toANSI() публичный статический Метод

Returns a string with colorized ANSI Escape codes
public static toANSI ( $string ) : string
$string
Результат string

toHTML() публичный статический Метод

Returns an HTML-formatted string with colors/markup
public static toHTML ( string | array $string ) : string
$string string | array
Результат string

toJSON() публичный статический Метод

Returns an JSON-formatted string with colors/markup
public static toJSON ( string | array $string ) : string
$string string | array
Результат string

tokenize() публичный статический Метод

Splits the string by Format tokens
public static tokenize ( string $string ) : array
$string string
Результат array