Table of Contents

Method TryParseChar

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

TryParseChar(string?)

Parses a char from this string, if it holds one character and no more.

[Pure]
public static Maybe<char> TryParseChar(this string? value)

Parameters

value string

The string to parse. A null string gives no value.

Returns

Maybe<char>

A Maybe<T> that holds the one character of value, and one that holds no value when the length is not one character.

Remarks

Wraps TryParse(string, out char). A surrogate pair is two characters and so gives no value.