Table of Contents

Method ToLower

Namespace
Zyl.ExSpans
Assembly
ExSpans.dll

ToLower(ReadOnlyExSpan<char>, ExSpan<char>, CultureInfo?)

Copies the characters from the source span into the destination, converting each character to lowercase, using the casing rules of the specified culture.

public static nint ToLower(this ReadOnlyExSpan<char> source, ExSpan<char> destination, CultureInfo? culture)

Parameters

source ReadOnlyExSpan<char>

The source span.

destination ExSpan<char>

The destination span which contains the transformed characters.

culture CultureInfo

An object that supplies culture-specific casing rules.

Returns

nint

The number of characters written into the destination span. If the destination is too small, returns -1.

Remarks

If culture is null, CurrentCulture will be used.

Exceptions

InvalidOperationException

The source and destination buffers overlap.

ExSpanTooLongException

Throws an exception if the length is out of the range of Int32.