Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Utf8 Class

Definition

Namespace:
System.Text.Unicode
Assembly:
System.Runtime.dll
Assembly:
Microsoft.Bcl.Memory.dll
Package:
Microsoft.Bcl.Memory v11.0.0-preview.5.26302.115
Source:
Utf8.cs
Source:
Utf8.cs
Source:
Utf8.cs
Source:
Utf8.cs
Source:
Utf8.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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<Char>, Span<Byte>, Int32, Int32, Boolean, Boolean)

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

IndexOfInvalidSubsequence(ReadOnlySpan<Byte>)
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


Feedback

Was this page helpful?