Fix another text wrapping issue
| | |
| | | $subString = $substr_func($string, 0, $width, $charset); |
| | | |
| | | // last line |
| | | if ($subString === $string) { |
| | | if ($breakPos === false && $subString === $string) { |
| | | $cutLength = null; |
| | | } |
| | | else { |
| | |
| | | else if ($cut === false) { |
| | | $spacePos = $strpos_func($string, ' ', 0, $charset); |
| | | |
| | | if ($spacePos !== false) { |
| | | if ($spacePos !== false && $spacePos < $breakPos) { |
| | | $subString = $substr_func($string, 0, $spacePos, $charset); |
| | | $cutLength = $spacePos + 1; |
| | | } |
| | |
| | | array("abc def", 3, "-"), |
| | | "abc-def", |
| | | ), |
| | | array( |
| | | array("----------------------------------------------------------------------------------------\nabc def123456789012345", 76), |
| | | "----------------------------------------------------------------------------------------\nabc def123456789012345", |
| | | ), |
| | | ); |
| | | |
| | | foreach ($samples as $sample) { |