Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - wpstrip(<expc> [,<n spaces per tab>]) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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.

See Also: FILEREAD() FILEWRITE() TABSTRIP() WRAP()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson