Table of Contents

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 string

The string to parse.

result ExInt128

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 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 ExInt128

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 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 ExInt128

When 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

bool

true if utf8Text was converted successfully; otherwise, false.

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 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 ExInt128

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 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 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 ExInt128

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 ExInt128)

Tries to parse a string into a value.

public static bool TryParse(string? s, IFormatProvider? provider, out ExInt128 result)

Parameters

s string

The string to parse.

provider IFormatProvider

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

result ExInt128

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 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 IFormatProvider

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

result ExInt128

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 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 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 ExInt128

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 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 IFormatProvider

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

result ExInt128

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.