substr() public static method

Multibyte enabled version of substr().
public static substr ( string $string, integer $start, integer $length = null, array $options = [] ) : string
$string string The string to extract the substring from.
$start integer Position of first character in string (offset).
$length integer Maximum numbers of characters to use from string.
$options array Allows for selecting the adapter to use via the `name` options. Will use the `'default'` adapter by default.
return string The substring extracted from given string.
 public function testSubstr()
 {
     Multibyte::substr('abcab', 1);
     $result = $this->adapter->testSubstrArgs;
     $expected = array('abcab', 1, null);
     $this->assertEqual($expected, $result);
     Multibyte::substr('abcab', 1, 2);
     $result = $this->adapter->testSubstrArgs;
     $expected = array('abcab', 1, 2);
     $this->assertEqual($expected, $result);
 }