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
sstringThe string to parse.
resultExInt128When this method returns, contains the result of successfully parsing
sor 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
sReadOnlySpan<char>The span of characters to parse.
resultExInt128When this method returns, contains the result of successfully parsing
sor 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
utf8TextReadOnlySpan<byte>A span containing the UTF-8 characters representing the number to convert.
resultExInt128When this method returns, contains the 128-bit signed integer value equivalent to the number contained in
utf8Textif 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
sstringThe string to parse.
styleNumberStylesA bitwise combination of number styles that can be present in
s.providerIFormatProviderAn object that provides culture-specific formatting information about
s.resultExInt128When this method returns, contains the result of successfully parsing
sor 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
sReadOnlySpan<char>The span of characters to parse.
styleNumberStylesA bitwise combination of number styles that can be present in
s.providerIFormatProviderAn object that provides culture-specific formatting information about
s.resultExInt128When this method returns, contains the result of successfully parsing
sor 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
sstringThe string to parse.
providerIFormatProviderAn object that provides culture-specific formatting information about
s.resultExInt128When this method returns, contains the result of successfully parsing
sor 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
sReadOnlySpan<char>The span of characters to parse.
providerIFormatProviderAn object that provides culture-specific formatting information about
s.resultExInt128When 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
utf8TextReadOnlySpan<byte>The span of UTF-8 characters to parse.
styleNumberStylesA bitwise combination of number styles that can be present in
utf8Text.providerIFormatProviderAn object that provides culture-specific formatting information about
utf8Text.resultExInt128On return, contains the result of successfully parsing
utf8Textor an undefined value on failure.
Returns
Exceptions
- ArgumentException
styleis 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
utf8TextReadOnlySpan<byte>The span of UTF-8 characters to parse.
providerIFormatProviderAn object that provides culture-specific formatting information about
utf8Text.resultExInt128On return, contains the result of successfully parsing
utf8Textor an undefined value on failure.