--- fenglin/lib/str_process.inc.php 2025/04/04 03:01:37 1.14 +++ fenglin/lib/str_process.inc.php 2025/04/27 04:32:05 1.17 @@ -1,4 +1,4 @@ -= $lines_limit) @@ -104,9 +104,7 @@ function split_line(string $str, string $line_len++; } - $line .= $c; - - if ($line_len >= $width) + if ($line_len > $width) { if ($lines_count + 1 >= $lines_limit) { @@ -116,8 +114,10 @@ function split_line(string $str, string $result .= ($line . $end_of_line); $lines_count++; $line = $prefix; - $line_len = $prefix_len; + $line_len = $prefix_len + 1; } + + $line .= $c; } if ($lines_count < $lines_limit)