TextEncoder.EncodeUtf8 Method
Definition
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.
Encodes the supplied UTF-8 text.
public virtual System.Buffers.OperationStatus EncodeUtf8 (ReadOnlySpan<byte> utf8Source, Span<byte> utf8Destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true);
abstract member EncodeUtf8 : ReadOnlySpan<byte> * Span<byte> * int * int * bool -> System.Buffers.OperationStatus
override this.EncodeUtf8 : ReadOnlySpan<byte> * Span<byte> * int * int * bool -> System.Buffers.OperationStatus
Public Overridable Function EncodeUtf8 (utf8Source As ReadOnlySpan(Of Byte), utf8Destination As Span(Of Byte), ByRef bytesConsumed As Integer, ByRef bytesWritten As Integer, Optional isFinalBlock As Boolean = true) As OperationStatus
Parameters
- utf8Source
- ReadOnlySpan<Byte>
A source buffer containing the UTF-8 text to encode.
The destination buffer to which the encoded form of utf8Source
will be written.
- bytesConsumed
- Int32
The number of bytes consumed from the utf8Source
buffer.
- bytesWritten
- Int32
The number of bytes written to the utf8Destination
buffer.
- isFinalBlock
- Boolean
true
to indicate there is no further source data that needs to be encoded; otherwise, false
.
Returns
A status code that describes the result of the encoding operation.
Remarks
The utf8Source
and utf8Destination
buffers must not overlap.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기