| @@ 5114-5120 (lines=7) @@ | ||
| 5111 | return null; |
|
| 5112 | } |
|
| 5113 | ||
| 5114 | if ($offset || $length !== null) { |
|
| 5115 | $strTmp = self::substr($str, $offset, $length); |
|
| 5116 | if ($strTmp === false) { |
|
| 5117 | return null; |
|
| 5118 | } |
|
| 5119 | $str = (string)$strTmp; |
|
| 5120 | } |
|
| 5121 | ||
| 5122 | $str = (string)$str; |
|
| 5123 | if (!isset($str[0])) { |
|
| @@ 6022-6028 (lines=7) @@ | ||
| 6019 | */ |
|
| 6020 | public static function strspn($str, $mask, $offset = 0, $length = null) |
|
| 6021 | { |
|
| 6022 | if ($offset || $length !== null) { |
|
| 6023 | $strTmp = self::substr($str, $offset, $length); |
|
| 6024 | if ($strTmp === false) { |
|
| 6025 | $strTmp = ''; |
|
| 6026 | } |
|
| 6027 | $str = (string)$strTmp; |
|
| 6028 | } |
|
| 6029 | ||
| 6030 | $str = (string)$str; |
|
| 6031 | if (!isset($str[0], $mask[0])) { |
|