How can I split a long string so that it matches with a given rectangle?
问题 I have one long string and I want to split it in a few pieces so that every line of the text is always in the given rectangle. The text should not exceed the border of the rectangle. The height of the rectangle isn't the problem. The text will never touch the bottom of the rectangle because the rectangle is very tall. But the rectangle isn't very wide. How can I calculate which parts of the string should be drawn in each line? I don't want to split a word. If a word exceeds the border of the