System::Buffers::StandardFormat class

StandardFormat class

Represents a standard format specifier with an optional precision. It wraps a format symbol (a single character, e.g. ‘D’, ‘X’, ‘O’, or ‘\0’ for the default format) and an optional precision in the range [0, 99]. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

class StandardFormat : public System::Details::BoxableObjectBase

Methods

MethodDescription
Equals(const StandardFormat&) constDetermines whether the current instance is equal to the specified one.
get_Format() constGets the standard format symbol.
get_IsDefault() constDetermines whether this instance represents the default format.
get_Precision() constGets the precision (number of digits) for this format, or NoPrecision if none.
GetHashCode() constReturns a hash code for the current StandardFormat.
StandardFormat()Constructs a default StandardFormat that represents the default format.
explicit StandardFormat(char_t)Constructs a StandardFormat with the specified format symbol and no precision.
StandardFormat(char_t, uint8_t)Constructs a StandardFormat with the specified format symbol and precision.
ToString() constReturns a string representation of the current StandardFormat. Default format instances are represented as “default”; otherwise the representation is the format symbol optionally followed by the precision, e.g. “X”, “X4”, “O”.

Fields

FieldDescription
static constexpr DefaultFormatSymbolThe symbol used to represent the default format. An instance whose Format equals this value (and whose Precision equals NoPrecision) is considered default.
static constexpr NoPrecisionThe maximum precision value that can be specified. A precision of this value means “no explicit precision”.

See Also