WPSTRIP(<expC> [,<N spaces per tab>])
Eliminates word-processing characters from text.
Returns <expC> with spaces replacing tabs, line-feeds, and carriage-returns.
<spaces per tab> will be substituted for each tab character in <expC>.
Valid range is from zero to 16; default is 1 if omitted.
Useful in editing and handling word-processed files as
non-processed straight text.
ASCII values of word-processing characters stripped are:
WP character Decimal Hex
════════════════════ ═══════ ═══
Tab 09 09
Line-feed 10 0A
Hard carriage-return 13 0D
Soft carriage-return 141 8D
* Strip WP codes while reading file into memo field
REPLACE Memo_field WITH WPSTRIP(FILEREAD("Textfile.txt"))
* Strip WP codes while writing one file to another
written = FILEWRITE( "Newfile.txt", WPSTRIP(FILEREAD("Textfile.txt")) )
IF written = "DONE"
? "File was successfully written"
ELSE
? written && error message
ENDIF
Placed in the Public Domain by Tom Rettig Assoc.