StringFormatterFixed
static class StringFormatterFixedimport StringFormatterFixed from Wax;Low-level fixed, scientific, and general double formatting into caller-owned storage. Precision
must be nonnegative, and the destination must fit the complete result. Methods return byte
counts and write no terminator; too-small buffers may contain partial output after a panic.
Prefer StringBuilder or primitive Format when automatic capacity management is desired.
Inherits from object. Follow these links for inherited members.
Members
FormatDoubleFixedmethod
public static fn FormatDoubleFixed(Span<uint8> buf, double v, int32 precision) : int32Writes fixed notation with exactly precision fractional digits and returns the number of
bytes written. Use nonnegative precision and enough destination space.
FormatDoubleExpmethod
public static fn FormatDoubleExp(Span<uint8> buf, double v, int32 precision, bool upperExp) : int32Writes scientific notation with exactly precision fractional digits and returns the number
of bytes written. Use nonnegative precision and enough destination space. upperExp selects
E versus e in an exponent.
FormatDoubleGmethod
public static fn FormatDoubleG(Span<uint8> buf, double v, int32 precision, bool upperExp) : int32Writes general notation with precision significant digits, selecting fixed or scientific
form and trimming trailing fractional zeros and returns the number of bytes written. Use
nonnegative precision and enough destination space. upperExp selects E versus e in an
exponent. Zero precision means one significant digit.