Dear Java programmer,
I am building a string manipulator function in java. A list of long string will be sliced into a few parts before adding them into excel's cell.
Basically, I have defined the width of the cell in the excel template that i created. A cell will be able to show up to 160 characters, the 161st character would be shown on the next row
However there are a few rules:
1. If there is a carriage return, the next string after it will be put in the next row.
2. If the 160th character is part of a word, that word should be put in the next row. For example: "Manipulation" and the 160th char is "p", the whole word Manipulation will be inserted into the next row.
I have wrote the code but it is still not perfect yet. Anyone who can help me to correct it?