I'm curious how you will handle this.
There are many little issues and options related to wrapping, newline vs processing, and how
to handle things when you reach the very last character of a line and the bottom line of a text area.
For example, does wrap back to column 0? To allow easy over writing of the line.
If so, you can can't drop the cursor position to the next line until you print the next character after
the wrap point.
Otherwise you won't be able to draw a full line of text and overwrite it by using .
Does the full line of text on the line being wrapped to get fully erased when an auto wrap/newline occurs?
Then there is the issue of how to handle wrapping of the very last line.
Does the text area scroll after that, does the text wrap to the top line or does it just start
throwing away the text.
The most painful to deal with is supporting a single line text area.
Users want and expect to be able to do this:
lcd.println("my new line");
And have each line show up erasing the previous line.
But technically if you process the newline as you see it, and support scrolling, or automatically
erasing a line that is wrapped to, you end up scrolling out the very line that they just printed.
In the big picture, handling this single line case is the same as having to deal with allowing
printing of a full line when you support erasing the line wrapped to.
You have to defer the wrap and newline processing until after the next character after the wrap
point is printed.
Lots of little details to think about.
--- bill