Computer Science Canada Text wrapping |
Author: | Mayb123 [ Wed Dec 19, 2007 1:08 pm ] |
Post subject: | Text wrapping |
Hey everyone. does anyone know how to keep long pieces of text from clipping at the right side of the run window and to continue on the next line? |
Author: | Tony [ Wed Dec 19, 2007 1:17 pm ] |
Post subject: | RE:Text wrapping |
Print text one word at a time, check to see if there's enough space left on the line (maxcol - text printed so far) for the next word to fit. Otherwise linebreak with \n (or put "") and continue. |
Author: | richcash [ Wed Dec 19, 2007 1:24 pm ] |
Post subject: | Re: Text wrapping |
You'll probably also need the length function which returns the length of a string. |