--- fenglin/lib/str_process.inc.php 2025/03/28 10:31:26 1.13 +++ fenglin/lib/str_process.inc.php 2025/05/19 01:48:57 1.19 @@ -1,5 +1,5 @@ -= $lines_limit) @@ -102,9 +104,7 @@ function split_line($str, $prefix = "", $line_len++; } - $line .= $c; - - if ($line_len >= $width) + if ($line_len > $width) { if ($lines_count + 1 >= $lines_limit) { @@ -114,8 +114,10 @@ function split_line($str, $prefix = "", $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) @@ -125,4 +127,3 @@ function split_line($str, $prefix = "", return $result; } -?>