Method TryParse
- Namespace
- Zyl.VectorTraits.ExTypes
- Assembly
- VectorTraits.dll
TryParse(string?, out ExInt128)
Tries to parse a string into a value.
public static bool TryParse(string? s, out ExInt128 result)
Parameters
s
stringThe string to parse.
result
ExInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<char>, out ExInt128)
Tries to parse a span of characters into a value.
public static bool TryParse(ReadOnlySpan<char> s, out ExInt128 result)
Parameters
s
ReadOnlySpan<char>The span of characters to parse.
result
ExInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<byte>, out ExInt128)
Tries to convert a UTF-8 character span containing the string representation of a number to its 128-bit signed integer equivalent.
public static bool TryParse(ReadOnlySpan<byte> utf8Text, out ExInt128 result)
Parameters
utf8Text
ReadOnlySpan<byte>A span containing the UTF-8 characters representing the number to convert.
result
ExInt128When this method returns, contains the 128-bit signed 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 ExInt128)
Tries to parse a string into a value.
public static bool TryParse(string? s, NumberStyles style, IFormatProvider? provider, out ExInt128 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
ExInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<char>, NumberStyles, IFormatProvider?, out ExInt128)
Tries to parse a span of characters into a value.
public static bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, out ExInt128 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
ExInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(string?, IFormatProvider?, out ExInt128)
Tries to parse a string into a value.
public static bool TryParse(string? s, IFormatProvider? provider, out ExInt128 result)
Parameters
s
stringThe string to parse.
provider
IFormatProviderAn object that provides culture-specific formatting information about
s
.result
ExInt128When this method returns, contains the result of successfully parsing
s
or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<char>, IFormatProvider?, out ExInt128)
Tries to parse a span of characters into a value.
public static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out ExInt128 result)
Parameters
s
ReadOnlySpan<char>The span of characters to parse.
provider
IFormatProviderAn object that provides culture-specific formatting information about
s
.result
ExInt128When this method returns, contains the result of successfully parsing
s
, or an undefined value on failure.
Returns
TryParse(ReadOnlySpan<byte>, NumberStyles, IFormatProvider?, out ExInt128)
Tries to parse a span of UTF-8 characters into a value.
public static bool TryParse(ReadOnlySpan<byte> utf8Text, NumberStyles style, IFormatProvider? provider, out ExInt128 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
ExInt128On 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 ExInt128)
Tries to parse a span of UTF-8 characters into a value.
public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out ExInt128 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
ExInt128On return, contains the result of successfully parsing
utf8Text
or an undefined value on failure.