语言

MemoryExtensions.ToUpperInvariant 方法

定义

将源范围中的字符复制到目标,使用固定区域性的大小写规则将每个字符转换为大写。

public:
[System::Runtime::CompilerServices::Extension]
 static int ToUpperInvariant(ReadOnlySpan<char> source, Span<char> destination);
public static int ToUpperInvariant(this ReadOnlySpan<char> source, Span<char> destination);
static member ToUpperInvariant : ReadOnlySpan<char> * Span<char> -> int
<Extension()>
Public Function ToUpperInvariant (source As ReadOnlySpan(Of Char), destination As Span(Of Char)) As Integer

参数

source
ReadOnlySpan<Char>

源范围。

destination
Span<Char>

包含转换字符的目标范围。

返回

写入目标范围的字符数。 如果目标太小,则返回 -1。

例外

源缓冲区和目标缓冲区重叠。

适用于