@@ 415-420 (lines=6) @@ | ||
412 | return substr($s, $start, null === $length ? 2147483647 : $length); |
|
413 | } |
|
414 | ||
415 | if ($start < 0) { |
|
416 | $start = iconv_strlen($s, $encoding) + $start; |
|
417 | if ($start < 0) { |
|
418 | $start = 0; |
|
419 | } |
|
420 | } |
|
421 | ||
422 | if (null === $length) { |
|
423 | $length = 2147483647; |
|
@@ 424-429 (lines=6) @@ | ||
421 | ||
422 | if (null === $length) { |
|
423 | $length = 2147483647; |
|
424 | } elseif ($length < 0) { |
|
425 | $length = iconv_strlen($s, $encoding) + $length - $start; |
|
426 | if ($length < 0) { |
|
427 | return ''; |
|
428 | } |
|
429 | } |
|
430 | ||
431 | return iconv_substr($s, $start, $length, $encoding).''; |
|
432 | } |