2 * Worldvisions Weaver Software:
3 * Copyright (C) 2005 Net Integration Technologies, Inc.
5 * Implementation of an efficient lookup for a set characters.
7 * It is, however, a little space intensive, but you should statically
8 * create them in your functions, and then they won't be so bad.
10 #include "wvstringmask.h"
12 WvStringMask::WvStringMask(WvStringParm s
)
18 WvStringMask::WvStringMask(char c
)
24 bool WvStringMask::operator[](const char c
) const
30 const char WvStringMask::first() const
35 void WvStringMask::zap()
37 memset(_set
, 0, sizeof(bool) * sizeof(_set
));
41 void WvStringMask::set(const char c
, bool value
)
46 _set
[unsigned(c
)] = value
;
49 void WvStringMask::set(WvStringParm s
, bool value
)
53 const char *c
= s
.cstr();
60 _set
[unsigned(*c
)] = value
;