StringFormatter
static class StringFormatterimport StringFormatter from Wax;Low-level shortest-round-trip float and double formatting into caller-owned byte storage. Prefer
primitive ToString or StringBuilder when buffer management is unnecessary. A 40-byte
destination accommodates these shortest forms. Results are UTF-8/ASCII bytes without a
terminator.
Inherits from object. Follow these links for inherited members.
Members
FormatDoublemethod
public static fn FormatDouble(Span<uint8> buf, double v) : int32Writes the shortest round-trip form of the supplied floating-point value at the start of the span, returning the number of bytes written. NaN, infinities, and signed zero are handled explicitly. Insufficient destination space can panic after partial writes.
FormatFloatmethod
public static fn FormatFloat(Span<uint8> buf, float v) : int32Writes the shortest round-trip form of the supplied floating-point value at the start of the span, returning the number of bytes written. NaN, infinities, and signed zero are handled explicitly. Insufficient destination space can panic after partial writes.