|
On Fri, 1 Apr 2005, phil wrote:
James Rich wrote:
I've run into a problem implementing word wrap. When a word doesn't fit at the end of a field, I need to put it on the next field and pad with blanks. However, I need to distinguish between blanks I use for padding and those blanks the user entered. My best idea so far is to use special characters and then modify the functions for display to replace them with blanks. Initially I have chosen to use hex FE since my charts show that as a non-existent character in both EBCDIC and ASCII. Interestingly, it still maps to a character. I think this idea is the way to go (it is working) but I need a non-blank character that can't possibly be a valid display character. Any suggestions?
How about 0x00?
I don't understand.
Assuming this is driven by keyboard interrupt, If the last char a user entered on line 1 is space, you don't need to word wrap. just
position the cursor on the line 2. If the last char was non space,
just grab the last word.
James Rich
It's not the software that's free; it's you. - billyskank on Groklaw
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.