PHP Class lithium\g11n\multibyte\adapter\Intl

Internally works with a fixed encoding of UTF-8. This means you can't use this adapter for anything different than UTF-8 encoded strings. Silently returns null or false when input string contains badly formed UTF-8 sequences.
Inheritance: extends lithium\core\Object
显示文件 Open project: unionofrad/lithium Class Usage Examples

Public Methods

Method Description
enabled ( ) : boolean Determines if this adapter is enabled by checking if the intl extension is loaded.
strlen ( string $string ) : integer | void Here used as a multibyte enabled equivalent of strlen().
strpos ( string $haystack, string $needle, integer $offset ) : integer | boolean Here used as a multibyte enabled equivalent of strpos().
strrpos ( string $haystack, string $needle ) : integer | boolean Here used as a multibyte enabled equivalent of strrpos().
substr ( string $string, integer $start, integer $length ) : string | boolean Here used as a multibyte enabled equivalent of substr().

Method Details

enabled() public static method

Determines if this adapter is enabled by checking if the intl extension is loaded.
public static enabled ( ) : boolean
return boolean Returns `true` if enabled, otherwise `false`.

strlen() public method

Here used as a multibyte enabled equivalent of strlen().
public strlen ( string $string ) : integer | void
$string string
return integer | void

strpos() public method

Here used as a multibyte enabled equivalent of strpos().
public strpos ( string $haystack, string $needle, integer $offset ) : integer | boolean
$haystack string
$needle string
$offset integer
return integer | boolean

strrpos() public method

Here used as a multibyte enabled equivalent of strrpos().
public strrpos ( string $haystack, string $needle ) : integer | boolean
$haystack string
$needle string
return integer | boolean

substr() public method

Here used as a multibyte enabled equivalent of substr().
public substr ( string $string, integer $start, integer $length ) : string | boolean
$string string
$start integer
$length integer
return string | boolean