ExcelNumberFormat
A backward-compatible version of .
Starting from .net Core 3.0 the default precision used for formatting floating point number has changed.
To always format numbers the same way, no matter what version of runtime is used, we specify the precision explicitly.
Prints right-aligned, left-padded integer before the decimal separator. With optional most-significant zero.
Prints left-aligned, right-padded integer after the decimal separator. Does not print significant zero.
Prints left-aligned, left-padded fraction integer denominator.
Assumes tokens contain only placeholders, valueString has fewer or equal number of digits as tokens.
Returns the first digit from valueString. If the token is '?'
returns the first significant digit from valueString, or '0' if there are no significant digits.
The out valueIndex parameter contains the offset to the next digit in valueString.
Parse ECMA-376 number format strings and format values like Excel and other spreadsheet softwares.
Initializes a new instance of the class.
The number format string.
Gets a value indicating whether the number format string is valid.
Gets the number format string.
Gets a value indicating whether the format represents a DateTime
Gets a value indicating whether the format represents a TimeSpan
Formats a value with this number format in a specified culture.
The value to format.
The culture to use for formatting.
The formatted string.
Parses as many placeholders and literals needed to format a number with optional decimals.
Returns number of tokens parsed, or 0 if the tokens didn't form a number.