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>

目的地範圍,其中包含已轉換的字元。

傳回

Int32

寫入目的地範圍的字元數。 如果目的地太小,則傳回 -1。

例外狀況

來源和目的地緩衝區重疊。

適用於