FlagSet class in LotusScript

This class is great if you are handling any type of ”flags”, like the $flags field in design documents. The class seems very simple, but more easy to read than String operations like mid / left etc. Can be used like this:

Dim flags As New FlagSet(”abcde”)

Print flags.isFlagSet(”a”) ‘ Will be true

Print flags.isFlagSet(”x”) ‘ Will be false

Call flags.setFlag(”f”)

Print flags.toString() ‘ Returns ”abcdef”

Call flags.removeFlag(”a”)

Print flags.toString() ‘ Returns ”bcdef”

Call flags.setFlags(”xyz”)

Print flags.toString() ‘ Returns ”xyz”