Charset

angerangel edited this page Jan 2, 2013 · 1 revision
Clone this wiki locally

Table of Contents

USAGE

  CHARSET chars /length len

DESCRIPTION

Makes a bitset of chars for the parse function. CHARSET is a function value.

ARGUMENTS

  • chars (string! block! binary! char! integer!)

REFINEMENTS

  • /length -- Preallocate this many bits
    • len -- Must be > 0 (integer!)

SOURCE

charset: make function! [  [
    "Makes a bitset of chars for the parse function."
    chars [string! block! binary! char! integer!]
    /length "Preallocate this many bits"
    len [integer!] "Must be > 0"
][
    either length [append make bitset! len chars] [make bitset! chars]
] ]