Class LeadingNumber
Namespace: ValveResourceFormat.Utils
Assembly: ValveResourceFormat.dll
Reads the number text starts with the way C's atoi and atof do: whatever follows it is ignored, and text that starts with no number is zero.
csharp
public static class LeadingNumberInheritance
object ← LeadingNumber
Methods
ParseFloat(ReadOnlySpan<char>)
Reads the number text starts with: an optional sign, digits, and a fraction after a point.
csharp
public static float ParseFloat(ReadOnlySpan<char> text)Parameters
text ReadOnlySpan<char>
The text, which may start with white space.
Returns
float
The number, or zero when the text starts with none.
ParseInteger(ReadOnlySpan<char>)
Reads the integer text starts with: an optional sign and the digits after it.
csharp
public static int ParseInteger(ReadOnlySpan<char> text)Parameters
text ReadOnlySpan<char>
The text, which may start with white space.
Returns
int
The integer, or zero when the text starts with none or it does not fit.

