Method TryParse
- Namespace
- Zyl.VectorTraits.ExTypes
- Assembly
- VectorTraits.dll
TryParse(string?, out ExUInt128)
Tries to parse a string into a value.
public static bool TryParse(string? s, out ExUInt128 result)
Parameters
s
stringThe string to parse.
result
ExUInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<char>, out ExUInt128)
Tries to parse a span of characters into a value.
public static bool TryParse(ReadOnlySpan<char> s, out ExUInt128 result)
Parameters
s
ReadOnlySpan<char>The span of characters to parse.
result
ExUInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<byte>, out ExUInt128)
Tries to convert a UTF-8 character span containing the string representation of a number to its 128-bit unsigned integer equivalent.
public static bool TryParse(ReadOnlySpan<byte> utf8Text, out ExUInt128 result)
Parameters
utf8Text
ReadOnlySpan<byte>A span containing the UTF-8 characters representing the number to convert.
result
ExUInt128When this method returns, contains the 128-bit unsigned integer value equivalent to the number contained in
utf8Text
if the conversion succeeded, or zero if the conversion failed. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.
Returns
TryParse(string?, NumberStyles, IFormatProvider?, out ExUInt128)
Tries to parse a string into a value.
public static bool TryParse(string? s, NumberStyles style, IFormatProvider? provider, out ExUInt128 result)
Parameters
s
stringThe string to parse.
style
NumberStylesA bitwise combination of number styles that can be present in
s
.provider
IFormatProviderAn object that provides culture-specific formatting information about
s
.result
ExUInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<char>, NumberStyles, IFormatProvider?, out ExUInt128)
Tries to parse a span of characters into a value.
public static bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, out ExUInt128 result)
Parameters
s
ReadOnlySpan<char>The span of characters to parse.
style
NumberStylesA bitwise combination of number styles that can be present in
s
.provider
IFormatProviderAn object that provides culture-specific formatting information about
s
.result
ExUInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(string?, IFormatProvider?, out ExUInt128)
Tries to parse a string into a value.
public static bool TryParse(string? s, IFormatProvider? provider, out ExUInt128 result)
Parameters
s
stringThe string to parse.
provider
IFormatProviderAn object that provides culture-specific formatting information about
s
.result
ExUInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<char>, IFormatProvider?, out ExUInt128)
Tries to parse a span of characters into a value.
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out ExUInt128 result)
Parameters
s
ReadOnlySpan<char>The span of characters to parse.
provider
IFormatProviderAn object that provides culture-specific formatting information about
s
.result
ExUInt128When this method returns, contains the result of successfully parsing
s
, or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<byte>, NumberStyles, IFormatProvider?, out ExUInt128)
Tries to parse a span of UTF-8 characters into a value.
public static bool TryParse(ReadOnlySpan<byte> utf8Text, NumberStyles style, IFormatProvider? provider, out ExUInt128 result)
Parameters
utf8Text
ReadOnlySpan<byte>The span of UTF-8 characters to parse.
style
NumberStylesA bitwise combination of number styles that can be present in
utf8Text
.provider
IFormatProviderAn object that provides culture-specific formatting information about
utf8Text
.result
ExUInt128On return, contains the result of successfully parsing
utf8Text
or an undefined value on failure.
Returns
Exceptions
- ArgumentException
style
is not a supported NumberStyles value.
TryParse(ReadOnlySpan<byte>, IFormatProvider?, out ExUInt128)
Tries to parse a span of UTF-8 characters into a value.
public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out ExUInt128 result)
Parameters
utf8Text
ReadOnlySpan<byte>The span of UTF-8 characters to parse.
provider
IFormatProviderAn object that provides culture-specific formatting information about
utf8Text
.result
ExUInt128On return, contains the result of successfully parsing
utf8Text
or an undefined value on failure.