IntFlags.toString

Get a string representation of the list of set flags.

  1. string toString()
    struct IntFlags
    pragma(inline)
    string
    toString
    const pure @safe
    (
    )
  2. void toString(Writer w, FormatSpec!Char fmt = (FormatSpec!Char).init)

Examples

1 IntFlags flags;
2 assert(flags.toString() == "{}");
3 
4 flags = IntFlag.undef;
5 assert((flags.toString() == "{undefined result}") && (flags.toString() == IntFlag.undef.toString()));
6 
7 flags |= IntFlag.imag;
8 assert(flags.toString() == "{undefined result, imaginary component}", flags.toString());

Meta