PHP Class UTF

Inheritance: extends Prefab
Exibir arquivo Open project: bcosca/fatfree-core Class Usage Examples

Public Methods

Method Description
bom ( ) : string Return UTF-8 byte order mark
emojify ( $str ) : string Translate emoji tokens to Unicode font-supported symbols
ltrim ( $str ) : string Strip whitespaces from the beginning of a string
rtrim ( $str ) : string Strip whitespaces from the end of a string
stripos ( $stack, $needle, $ofs ) : integer | FALSE Find position of first occurrence of a string (case-insensitive)
stristr ( $stack, $needle, $before = FALSE ) : string | FALSE Returns part of haystack string from the first occurrence of needle to the end of haystack (case-insensitive)
strlen ( $str ) : integer Get string length
strpos ( $stack, $needle, $ofs, $case = FALSE ) : integer | FALSE Find position of first occurrence of a string
strrev ( $str ) : string Reverse a string
strstr ( $stack, $needle, $before = FALSE, $case = FALSE ) : string | FALSE Returns part of haystack string from the first occurrence of needle to the end of haystack
substr ( $str, $start, $len ) : string | FALSE Return part of a string
substr_count ( $stack, $needle ) : integer Count the number of substring occurrences
translate ( $str ) : string Convert code points to Unicode symbols
trim ( $str ) : string Strip whitespaces from the beginning and end of a string

Method Details

bom() public method

Return UTF-8 byte order mark
public bom ( ) : string
return string

emojify() public method

Translate emoji tokens to Unicode font-supported symbols
public emojify ( $str ) : string
$str string
return string

ltrim() public method

Strip whitespaces from the beginning of a string
public ltrim ( $str ) : string
$str string
return string

rtrim() public method

Strip whitespaces from the end of a string
public rtrim ( $str ) : string
$str string
return string

stripos() public method

Find position of first occurrence of a string (case-insensitive)
public stripos ( $stack, $needle, $ofs ) : integer | FALSE
$stack string
$needle string
$ofs int
return integer | FALSE

stristr() public method

Returns part of haystack string from the first occurrence of needle to the end of haystack (case-insensitive)
public stristr ( $stack, $needle, $before = FALSE ) : string | FALSE
$stack string
$needle string
$before bool
return string | FALSE

strlen() public method

Get string length
public strlen ( $str ) : integer
$str string
return integer

strpos() public method

Find position of first occurrence of a string
public strpos ( $stack, $needle, $ofs, $case = FALSE ) : integer | FALSE
$stack string
$needle string
$ofs int
$case bool
return integer | FALSE

strrev() public method

Reverse a string
public strrev ( $str ) : string
$str string
return string

strstr() public method

Returns part of haystack string from the first occurrence of needle to the end of haystack
public strstr ( $stack, $needle, $before = FALSE, $case = FALSE ) : string | FALSE
$stack string
$needle string
$before bool
$case bool
return string | FALSE

substr() public method

Return part of a string
public substr ( $str, $start, $len ) : string | FALSE
$str string
$start int
$len int
return string | FALSE

substr_count() public method

Count the number of substring occurrences
public substr_count ( $stack, $needle ) : integer
$stack string
$needle string
return integer

translate() public method

Convert code points to Unicode symbols
public translate ( $str ) : string
$str string
return string

trim() public method

Strip whitespaces from the beginning and end of a string
public trim ( $str ) : string
$str string
return string