dev.kanngard.net make sure you visit my new blog at: johankanngard.net

FlagSet class in LotusScript

by Johan Känngård / [LotusScript] / 2003-02-26 / #48


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"



Floppy icon FlagSet.lss2 Kb