Utf8 類別

定義

提供靜態方法,在 UTF-8 和 UTF-16 編碼間轉換區塊資料。

public ref class Utf8 abstract sealed
public static class Utf8
type Utf8 = class
Public Class Utf8
繼承
Utf8

方法

FromUtf16(ReadOnlySpan<Char>, Span<Byte>, Int32, Int32, Boolean, Boolean)

將 UTF-16 字元範圍轉換為 UTF-8 編碼的位元組範圍。

IsValid(ReadOnlySpan<Byte>)

驗證值的格式正確為 UTF-8。

ToUtf16(ReadOnlySpan<Byte>, Span<Char>, Int32, Int32, Boolean, Boolean)

將 UTF-8 編碼唯讀位元組範圍轉換為 UTF-16 編碼字元範圍。

TryWrite(Span<Byte>, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32)

將指定的插入字串寫入 UTF-8 位元組範圍。

TryWrite(Span<Byte>, Utf8+TryWriteInterpolatedStringHandler, Int32)

將指定的插入字串寫入 UTF-8 位元組範圍。

適用於