lithium\g11n\Multibyte::substr()
Returns the portion of string specified by the start and length parameters.
Multibyte enabled version of substr().
Parameters
-
string
$stringThe string to extract the substring from.
-
integer
$startPosition of first character in string (offset).
-
integer
$lengthMaximum numbers of characters to use from string.
-
array
$optionsAllows for selecting the adapter to use via the
nameoptions. Will use the'default'adapter by default.
Returns
stringThe substring extracted from given string.
Links
Source
public static function substr($string, $start, $length = null, array $options = array()) {
$defaults = array('name' => 'default');
$options += $defaults;
return static::adapter($options['name'])->substr($string, $start, $length);
}