\ 4tH library - S>ASCII7 - Copyright 2004 J.L. Bezemer
\ You can redistribute this file and/or modify it under
\ the terms of the GNU General Public License
[UNDEFINED] IS-PRINT [IF]
[NEEDS lib/istype.4th]
[THEN]
[UNDEFINED] S>ASCII7 [IF]
: >white dup c@ is-white if bl over c! then ;
: >ascii7 dup c@ is-print 0= if [char] ^ over c! then ;
\ strip all foreign chars
: s>ascii7 ( a n -- a n)
over over ( a n a n)
over >r ( a n a n)
chars + r> ( a n a+n a)
?do i >white >ascii7 drop loop ( a n)
;
[THEN]
|