PHP Class DiffMatchPatch\Utils

Author: Daniil Skrobov ([email protected])
Datei anzeigen Open project: yetanotherape/diff-match-patch

Public Methods

Method Description
escapeString ( string $string ) : string Special string encoding function like urlencode(), corresponding to Python's urllib.parse.quote(string, "!~*'();/?:@&=+$,# ")
unescapeString ( string $string ) : string Special string decoding function like urldecode(), corresponding to Python's urllib.parse.unquote(string)
unicodeChr ( integer $code ) : string Multibyte replacement for standard chr()
unicodeOrd ( string $char ) : integer Multibyte replacement for standard ord()

Method Details

escapeString() public static method

Special string encoding function like urlencode(), corresponding to Python's urllib.parse.quote(string, "!~*'();/?:@&=+$,# ")
public static escapeString ( string $string ) : string
$string string String for encoding.
return string Encoded string.

unescapeString() public static method

Special string decoding function like urldecode(), corresponding to Python's urllib.parse.unquote(string)
public static unescapeString ( string $string ) : string
$string string String for decoding.
return string Decoded string.

unicodeChr() public static method

Multibyte replacement for standard chr()
public static unicodeChr ( integer $code ) : string
$code integer Character code.
return string Char with given code

unicodeOrd() public static method

Multibyte replacement for standard ord()
public static unicodeOrd ( string $char ) : integer
$char string Char.
return integer Code of given char.