Method ToUpper
ToUpper(ReadOnlyExSpan<char>, ExSpan<char>, CultureInfo?)
Copies the characters from the source span into the destination, converting each character to uppercase, using the casing rules of the specified culture.
public static nint ToUpper(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
CultureInfoAn 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.