|
NanoXLSX.Core 3.0.0-rc.3
|
Class providing static methods to parse string values to specific types or to print object as language neutral string. More...
Static Public Member Functions | |
| static bool | StartsWith (string input, string value) |
| Determines whether a string starts with a specific value. | |
| static bool | NotStartsWith (string input, string value) |
| Determines whether a string does not start with a specific value. | |
| static string | ToUpper (string input) |
| Transforms a string to upper case with null check and invariant culture. | |
| static string | ToLower (string input) |
| Transforms a string to lower case with null check and invariant culture. | |
| static string | ToString (int input) |
| Transforms an integer to an invariant sting. | |
| static string | ToString (float input) |
| Transforms a float to an invariant sting. | |
| static string | ToString (byte input) |
| Transforms a byte to an invariant sting. | |
| static string | ToString (sbyte input) |
| Transforms a sbyte to an invariant sting. | |
| static string | ToString (double input) |
| Transforms a double to an invariant sting. | |
| static string | ToString (decimal input) |
| Transforms a decimal to an invariant sting. | |
| static string | ToString (uint input) |
| Transforms a uint to an invariant sting. | |
| static string | ToString (long input) |
| Transforms a long to an invariant sting. | |
| static string | ToString (ulong input) |
| Transforms a ulong to an invariant sting. | |
| static string | ToString (short input) |
| Transforms a short to an invariant sting. | |
| static string | ToString (ushort input) |
| Transforms a ushort to an invariant sting. | |
| static string | NormalizeNewLines (string value) |
| Normalizes all newlines of a string to CR+LF. | |
| static float | ParseFloat (string rawValue) |
| Parses a float independent from the culture info of the host. | |
| static int | ParseInt (string rawValue) |
| Parses an int independent from the culture info of the host. | |
| static int | ParseBinaryBool (String rawValue) |
| Parses a bool as a binary number either based on an int (0/1) or a string expression (true/ false), independent of the culture info of the host. | |
| static bool | TryParseInt (string rawValue, out int parsedValue) |
| Tries to parse an int independent of the culture info of the host. | |
| static bool | TryParseUint (string rawValue, out uint parsedValue) |
| Tries to parse an unsigned int (uint) independent from the culture info of the host. | |
| static bool | TryParseLong (string rawValue, out long parsedValue) |
| Tries to parse a long independent from the culture info of the host. | |
| static bool | TryParseUlong (string rawValue, out ulong parsedValue) |
| Tries to parse an unsigned long (ulong) independent from the culture info of the host. | |
| static bool | TryParseFloat (string rawValue, out float parsedValue) |
| Tries to parse a float (with any parsing style) independent from the culture info of the host. | |
| static bool | TryParseDecimal (string rawValue, out decimal parsedValue) |
| Tries to parse a decimal (with float parsing style) independent from the culture info of the host. | |
| static bool | TryParseDouble (string rawValue, out double parsedValue) |
| Tries to parse a double (with any parsing style) independent from the culture info of the host. | |
Static Public Attributes | |
| const string | NumericFormat = "G" |
| Numeric format for ToString conversions. This format ensures that a numeric value is printed in a language neutral way. | |
| static readonly CultureInfo | InvariantCulture = CultureInfo.InvariantCulture |
| Constant for number conversion. The invariant culture (represents mostly the US numbering scheme) ensures that no culture-specific punctuations are used when converting numbers to strings, This is especially important for OOXML number values. See also: https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.invariantculture?view=net-5.0. | |
Class providing static methods to parse string values to specific types or to print object as language neutral string.
Definition at line 18 of file ParserUtils.cs.
|
static |
Normalizes all newlines of a string to CR+LF.
| value | Input value |
Definition at line 206 of file ParserUtils.cs.
|
static |
Determines whether a string does not start with a specific value.
| input | String to check |
| value | Value to be checked, whether it occurs not at the beginning of the input string |
Definition at line 66 of file ParserUtils.cs.
|
static |
Parses a bool as a binary number either based on an int (0/1) or a string expression (true/ false), independent of the culture info of the host.
| rawValue | Raw number or expression as string |
Definition at line 240 of file ParserUtils.cs.
|
static |
Parses a float independent from the culture info of the host.
| rawValue | Raw number as string |
Definition at line 220 of file ParserUtils.cs.
|
static |
Parses an int independent from the culture info of the host.
| rawValue | Raw number as string |
Definition at line 230 of file ParserUtils.cs.
|
static |
Determines whether a string starts with a specific value.
| input | String to check |
| value | Value to be checked, whether it occurs at the beginning of the input string |
Definition at line 43 of file ParserUtils.cs.
|
static |
Transforms a string to lower case with null check and invariant culture.
| input | String to transform |
Definition at line 86 of file ParserUtils.cs.
|
static |
Transforms a byte to an invariant sting.
| input | Byte to transform |
Definition at line 116 of file ParserUtils.cs.
|
static |
Transforms a decimal to an invariant sting.
| input | Decimal to transform |
Definition at line 146 of file ParserUtils.cs.
|
static |
Transforms a double to an invariant sting.
| input | Double to transform |
Definition at line 136 of file ParserUtils.cs.
|
static |
Transforms a float to an invariant sting.
| input | Float to transform |
Definition at line 106 of file ParserUtils.cs.
|
static |
Transforms an integer to an invariant sting.
| input | Integer to transform |
Definition at line 96 of file ParserUtils.cs.
|
static |
Transforms a long to an invariant sting.
| input | Long to transform |
Definition at line 166 of file ParserUtils.cs.
|
static |
Transforms a sbyte to an invariant sting.
| input | Sbyte to transform |
Definition at line 126 of file ParserUtils.cs.
|
static |
Transforms a short to an invariant sting.
| input | Short to transform |
Definition at line 186 of file ParserUtils.cs.
|
static |
Transforms a uint to an invariant sting.
| input | Uint to transform |
Definition at line 156 of file ParserUtils.cs.
|
static |
Transforms a ulong to an invariant sting.
| input | Ulong to transform |
Definition at line 176 of file ParserUtils.cs.
|
static |
Transforms a ushort to an invariant sting.
| input | Ushort to transform |
Definition at line 196 of file ParserUtils.cs.
|
static |
Transforms a string to upper case with null check and invariant culture.
| input | String to transform |
Definition at line 76 of file ParserUtils.cs.
|
static |
Tries to parse a decimal (with float parsing style) independent from the culture info of the host.
| rawValue | Raw number as string |
| parsedValue | Parsed decimal |
Definition at line 330 of file ParserUtils.cs.
|
static |
Tries to parse a double (with any parsing style) independent from the culture info of the host.
| rawValue | Raw number as string |
| parsedValue | Parsed double |
Definition at line 341 of file ParserUtils.cs.
|
static |
Tries to parse a float (with any parsing style) independent from the culture info of the host.
| rawValue | Raw number as string |
| parsedValue | Parsed float |
Definition at line 319 of file ParserUtils.cs.
|
static |
Tries to parse an int independent of the culture info of the host.
| rawValue | Raw number as string |
| parsedValue | Parsed int |
Definition at line 275 of file ParserUtils.cs.
|
static |
Tries to parse a long independent from the culture info of the host.
| rawValue | Raw number as string |
| parsedValue | Parsed long |
Definition at line 297 of file ParserUtils.cs.
|
static |
Tries to parse an unsigned int (uint) independent from the culture info of the host.
| rawValue | Raw number as string |
| parsedValue | Parsed uint |
Definition at line 286 of file ParserUtils.cs.
|
static |
Tries to parse an unsigned long (ulong) independent from the culture info of the host.
| rawValue | Raw number as string |
| parsedValue | Parsed ulong |
Definition at line 308 of file ParserUtils.cs.
|
static |
Constant for number conversion. The invariant culture (represents mostly the US numbering scheme) ensures that no culture-specific punctuations are used when converting numbers to strings, This is especially important for OOXML number values. See also: https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.invariantculture?view=net-5.0.
Definition at line 33 of file ParserUtils.cs.
|
static |
Numeric format for ToString conversions. This format ensures that a numeric value is printed in a language neutral way.
Definition at line 25 of file ParserUtils.cs.