| @@ 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])) { |
|
| @@ 6021-6027 (lines=7) @@ | ||
| 6018 | */ |
|
| 6019 | public static function strspn($str, $mask, $offset = 0, $length = null) |
|
| 6020 | { |
|
| 6021 | if ($offset || $length !== null) { |
|
| 6022 | $strTmp = self::substr($str, $offset, $length); |
|
| 6023 | if ($strTmp === false) { |
|
| 6024 | $strTmp = ''; |
|
| 6025 | } |
|
| 6026 | $str = (string)$strTmp; |
|
| 6027 | } |
|
| 6028 | ||
| 6029 | $str = (string)$str; |
|
| 6030 | if (!isset($str[0], $mask[0])) { |
|