EnumTEnumParse(ReadOnlySpanChar, ReadOnlySpanChar, Boolean) Method
Converts the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
public static TEnum Parse(
ReadOnlySpan<char> value,
ReadOnlySpan<char> separator = default,
bool ignoreCase = false
)
Public Shared Function Parse (
value As ReadOnlySpan(Of Char),
Optional separator As ReadOnlySpan(Of Char) = Nothing,
Optional ignoreCase As Boolean = false
) As TEnum
public:
static TEnum Parse(
ReadOnlySpan<wchar_t> value,
ReadOnlySpan<wchar_t> separator = ReadOnlySpan<wchar_t>(),
bool ignoreCase = false
)
static member Parse :
value : ReadOnlySpan<char> *
?separator : ReadOnlySpan<char> *
?ignoreCase : bool
(* Defaults:
let _separator = defaultArg separator new ReadOnlySpan<char>()
let _ignoreCase = defaultArg ignoreCase false
*)
-> 'TEnum
- value ReadOnlySpanChar
- The string representation of the enumerated value or values to parse.
- separator ReadOnlySpanChar (Optional)
- In case of more values specified the separator among the values. If empty, then comma (,) separator is used. This parameter is optional.
Default value: ReadOnlySpan<char>.Empty - ignoreCase Boolean (Optional)
- If , ignores case; otherwise, regards case. This parameter is optional.
Default value: .
TEnumThe parsed
enum value.