IntFlags.toString

Get a string representation of the list of set flags.

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

Examples

IntFlags flags;
assert(flags.toString() == "{}");

flags = IntFlag.undef;
assert((flags.toString() == "{undefined result}") && (flags.toString() == IntFlag.undef.toString()));

flags |= IntFlag.imag;
assert(flags.toString() == "{undefined result, imaginary component}", flags.toString());

Meta