Returns the portion of string specified by the start and length parameters. Multibyte enabled version of `substr()`.

Parameters

  • string $string The string to extract the substring from.
  • integer $start Position of first character in string (offset).
  • integer $length Maximum numbers of characters to use from string.
  • array $options Allows for selecting the adapter to use via the `name` options. Will use the `'default'` adapter by default.

Returns

string The substring extracted from given string.

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);
	}