PHP Class pocketmine\utils\TextFormat

Afficher le fichier Open project: ClearSkyTeam/ClearSky Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

clean() public static méthode

Cleans the string from Minecraft codes and ANSI Escape Codes
public static clean ( string $string, boolean $removeFormat = true ) : mixed
$string string
$removeFormat boolean
Résultat mixed

toANSI() public static méthode

Returns a string with colorized ANSI Escape codes
public static toANSI ( $string ) : string
$string
Résultat string

toHTML() public static méthode

Returns an HTML-formatted string with colors/markup
public static toHTML ( string | array $string ) : string
$string string | array
Résultat string

toJSON() public static méthode

Returns an JSON-formatted string with colors/markup
public static toJSON ( string | array $string ) : string
$string string | array
Résultat string

tokenize() public static méthode

Splits the string by Format tokens
public static tokenize ( string $string ) : array
$string string
Résultat array