Table of Contents

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 string

The string to parse.

result ExUInt128

When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

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 ExUInt128

When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

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 ExUInt128

When 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

bool

true if utf8Text was converted successfully; otherwise, false.

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 string

The string to parse.

style NumberStyles

A bitwise combination of number styles that can be present in s.

provider IFormatProvider

An object that provides culture-specific formatting information about s.

result ExUInt128

When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

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 NumberStyles

A bitwise combination of number styles that can be present in s.

provider IFormatProvider

An object that provides culture-specific formatting information about s.

result ExUInt128

When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

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 string

The string to parse.

provider IFormatProvider

An object that provides culture-specific formatting information about s.

result ExUInt128

When this method returns, contains the result of successfully parsing s or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

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 IFormatProvider

An object that provides culture-specific formatting information about s.

result ExUInt128

When this method returns, contains the result of successfully parsing s, or an undefined value on failure.

Returns

bool

true if s was successfully parsed; otherwise, false.

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 NumberStyles

A bitwise combination of number styles that can be present in utf8Text.

provider IFormatProvider

An object that provides culture-specific formatting information about utf8Text.

result ExUInt128

On return, contains the result of successfully parsing utf8Text or an undefined value on failure.

Returns

bool

true if utf8Text was successfully parsed; otherwise, false.

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 IFormatProvider

An object that provides culture-specific formatting information about utf8Text.

result ExUInt128

On return, contains the result of successfully parsing utf8Text or an undefined value on failure.

Returns

bool

true if utf8Text was successfully parsed; otherwise, false.