Breyta

Deila með


EncodingExtensions.GetChars Method

Definition

Overloads

GetChars(Encoding, ReadOnlySequence<Byte>, IBufferWriter<Char>)

Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and writes the result to writer.

GetChars(Encoding, ReadOnlySequence<Byte>, Span<Char>)

Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and outputs the result to chars.

GetChars(Encoding, ReadOnlySpan<Byte>, IBufferWriter<Char>)

Decodes the specified ReadOnlySpan<T> to chars using the specified Encoding and writes the result to writer.

GetChars(Encoding, ReadOnlySequence<Byte>, IBufferWriter<Char>)

Source:
EncodingExtensions.cs
Source:
EncodingExtensions.cs
Source:
EncodingExtensions.cs

Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and writes the result to writer.

public:
[System::Runtime::CompilerServices::Extension]
 static long GetChars(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<System::Byte> % bytes, System::Buffers::IBufferWriter<char> ^ writer);
public static long GetChars (this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, System.Buffers.IBufferWriter<char> writer);
static member GetChars : System.Text.Encoding * ReadOnlySequence * System.Buffers.IBufferWriter<char> -> int64
<Extension()>
Public Function GetChars (encoding As Encoding, ByRef bytes As ReadOnlySequence(Of Byte), writer As IBufferWriter(Of Char)) As Long

Parameters

encoding
Encoding

The encoding that represents how the data in bytes should be decoded.

bytes
ReadOnlySequence<Byte>

The sequence whose bytes should be decoded.

writer
IBufferWriter<Char>

The buffer to which the decoded chars will be written.

Returns

The number of chars written to writer.

Exceptions

bytes contains data that cannot be decoded and encoding is configured to throw when such data is seen.

Applies to

GetChars(Encoding, ReadOnlySequence<Byte>, Span<Char>)

Source:
EncodingExtensions.cs
Source:
EncodingExtensions.cs
Source:
EncodingExtensions.cs

Decodes the specified ReadOnlySequence<T> to chars using the specified Encoding and outputs the result to chars.

public:
[System::Runtime::CompilerServices::Extension]
 static int GetChars(System::Text::Encoding ^ encoding, System::Buffers::ReadOnlySequence<System::Byte> % bytes, Span<char> chars);
public static int GetChars (this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, Span<char> chars);
static member GetChars : System.Text.Encoding * ReadOnlySequence * Span<char> -> int
<Extension()>
Public Function GetChars (encoding As Encoding, ByRef bytes As ReadOnlySequence(Of Byte), chars As Span(Of Char)) As Integer

Parameters

encoding
Encoding

The encoding that represents how the data in bytes is encoded.

bytes
ReadOnlySequence<Byte>

The sequence to decode to characters.

chars
Span<Char>

The destination buffer to which the decoded characters will be written.

Returns

The number of chars written to chars.

Exceptions

chars is not large enough to contain the encoded form of bytes.

bytes contains data that cannot be decoded and encoding is configured to throw when such data is seen.

Applies to

GetChars(Encoding, ReadOnlySpan<Byte>, IBufferWriter<Char>)

Source:
EncodingExtensions.cs
Source:
EncodingExtensions.cs
Source:
EncodingExtensions.cs

Decodes the specified ReadOnlySpan<T> to chars using the specified Encoding and writes the result to writer.

public:
[System::Runtime::CompilerServices::Extension]
 static long GetChars(System::Text::Encoding ^ encoding, ReadOnlySpan<System::Byte> bytes, System::Buffers::IBufferWriter<char> ^ writer);
public static long GetChars (this System.Text.Encoding encoding, ReadOnlySpan<byte> bytes, System.Buffers.IBufferWriter<char> writer);
static member GetChars : System.Text.Encoding * ReadOnlySpan<byte> * System.Buffers.IBufferWriter<char> -> int64
<Extension()>
Public Function GetChars (encoding As Encoding, bytes As ReadOnlySpan(Of Byte), writer As IBufferWriter(Of Char)) As Long

Parameters

encoding
Encoding

The encoding that represents how the data in bytes should be decoded.

bytes
ReadOnlySpan<Byte>

The span of bytes to decode.

writer
IBufferWriter<Char>

The buffer to which the decoded chars will be written.

Returns

The number of chars written to writer.

Exceptions

bytes contains data that cannot be decoded and encoding is configured to throw when such data is seen.

Applies to