Прочитај на енглеском Уреди

Делите путем


Utf8 Class

Definition

Provides static methods that convert chunked data between UTF-8 and UTF-16 encodings.

C#
public static class Utf8
Inheritance
Utf8

Methods

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

Converts a UTF-16 character span to a UTF-8 encoded byte span.

IsValid(ReadOnlySpan<Byte>)

Validates that the value is well-formed UTF-8.

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

Converts a UTF-8 encoded read-only byte span to a UTF-16 encoded character span.

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

Writes the specified interpolated string to the UTF-8 byte span.

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

Writes the specified interpolated string to the UTF-8 byte span.

Applies to

Производ Верзије
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10