Language

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

Name Description
FromUtf16(ReadOnlySpan, Span, Int32, Int32, Boolean, Boolean)

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

IndexOfInvalidSubsequence(ReadOnlySpan)
IsValid(ReadOnlySpan)

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

ToUtf16(ReadOnlySpan, Span, Int32, Int32, Boolean, Boolean)

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

TryWrite(Span, IFormatProvider, Utf8+TryWriteInterpolatedStringHandler, Int32)

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

TryWrite(Span, Utf8+TryWriteInterpolatedStringHandler, Int32)

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

Applies to