Last modified on 27 October 2012, at 22:18

REBOL Programming/ascii?

USAGE:Edit

ASCII? value 

DESCRIPTION:Edit

Returns TRUE if value or string is in ASCII character range (below 128).

ASCII? is a function value.

ARGUMENTSEdit

  • value -- (Type: string file email url tag issue char integer)

SOURCE CODEEdit

ascii?: func [
    {Returns TRUE if value or string is in ASCII character range (below 128).} 
    value [string! file! email! url! tag! issue! char! integer!] /local 
    ascii
][
    ascii: make bitset! #{
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
} 
    either any-string? value [parse/all/case value [any ascii]] [value < 128]
]