BitArray.toString

void toString(W)(ref W sink, scope const ref FormatSpec!char fmt) if (isOutputRange!(W, char)) const

Return a string representation of this BitArray.

Two format specifiers are supported:

  • %s which prints the bits as an array, and
  • %b which prints the bits as 8-bit byte packets
  • separated with an underscore.

    Parameters

    sinkA char accepting output range.
    fmtA FormatSpec which controls how the data is displayed.