Edit

Share via


Utf8.TryWrite Method

Definition

Overloads

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

Writes the specified interpolated string to the UTF-8 byte 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)

Source:
Utf8.cs
Source:
Utf8.cs

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

public:
 static bool TryWrite(Span<System::Byte> destination, System::Text::Unicode::Utf8::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryWrite (Span<byte> destination, ref System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler handler, out int bytesWritten);
static member TryWrite : Span<byte> * TryWriteInterpolatedStringHandler * int -> bool
Public Shared Function TryWrite (destination As Span(Of Byte), ByRef handler As Utf8.TryWriteInterpolatedStringHandler, ByRef bytesWritten As Integer) As Boolean

Parameters

destination
Span<Byte>

The span to which the interpolated string should be formatted.

handler
Utf8.TryWriteInterpolatedStringHandler

The interpolated string.

bytesWritten
Int32

When this method returns, contains the number of characters written to the span.

Returns

true if the entire interpolated string could be formatted successfully; otherwise, false.

Applies to

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

Source:
Utf8.cs
Source:
Utf8.cs

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

public:
 static bool TryWrite(Span<System::Byte> destination, IFormatProvider ^ provider, System::Text::Unicode::Utf8::TryWriteInterpolatedStringHandler % handler, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryWrite (Span<byte> destination, IFormatProvider? provider, ref System.Text.Unicode.Utf8.TryWriteInterpolatedStringHandler handler, out int bytesWritten);
static member TryWrite : Span<byte> * IFormatProvider * TryWriteInterpolatedStringHandler * int -> bool
Public Shared Function TryWrite (destination As Span(Of Byte), provider As IFormatProvider, ByRef handler As Utf8.TryWriteInterpolatedStringHandler, ByRef bytesWritten As Integer) As Boolean

Parameters

destination
Span<Byte>

The span to which the interpolated string should be formatted.

provider
IFormatProvider

An object that supplies culture-specific formatting information.

handler
Utf8.TryWriteInterpolatedStringHandler

The interpolated string.

bytesWritten
Int32

When this method returns, contains the number of characters written to the span.

Returns

true if the entire interpolated string could be formatted successfully; otherwise, false.

Applies to