Edit

Share via


Utf8 Class

Definition

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

public ref class Utf8 abstract sealed
public static class Utf8
type Utf8 = class
Public 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