REBOL Document

Charset - Function Summary


Summary:

Makes a bitset of chars for the parse function.

Usage:

charset chars

Arguments:

chars - The chars argument. (must be: string block)

Description:

A shortcut for MAKE BITSET! Used commonly for character based bit sets.


    chars: charset "aeiou"
    print find chars "o"
    true


    print find "there you go" chars
    ere you go


    digits: charset "0123456789"
    area-code: ["(" 3 digits ")"]
    phone-num: [3 digits "-" 4 digits]
    print parse "(707)467-8000" [[area-code | none] phone-num]
    true

Related:

char? - Returns TRUE for char values.


<Back | Index | Next>

Copyright 2004 REBOL Technologies