| 1 |
<? |
<?php |
| 2 |
function str_length(string $str) : string |
function str_length(string $str) : int |
| 3 |
{ |
{ |
| 4 |
$len = strlen($str); |
$len = strlen($str); |
| 5 |
$ret = 0; |
$ret = 0; |
| 38 |
{ |
{ |
| 39 |
return $str; |
return $str; |
| 40 |
} |
} |
| 41 |
|
|
| 42 |
$result = ""; |
$result = ""; |
| 43 |
$len = strlen($str); |
$len = strlen($str); |
| 44 |
$prefix_len = str_length($prefix); |
$prefix_len = str_length($prefix); |
| 56 |
{ |
{ |
| 57 |
continue; |
continue; |
| 58 |
} |
} |
| 59 |
|
|
| 60 |
if ($c == "\n") |
if ($c == "\n") |
| 61 |
{ |
{ |
| 62 |
if ($lines_count + 1 >= $lines_limit) |
if ($lines_count + 1 >= $lines_limit) |
| 127 |
|
|
| 128 |
return $result; |
return $result; |
| 129 |
} |
} |
|
?> |
|