GetBytes()

Encoding::GetBytes(ArrayPtr<char_t>, int, int, ArrayPtr<uint8_t>, int) method

Get the bytes that result from encoding a character buffer.

virtual int System::Text::Encoding::GetBytes(ArrayPtr<char_t> chars, int char_index, int char_count, ArrayPtr<uint8_t> bytes, int byte_index)

Arguments

ParameterTypeDescription
charsArrayPtr<char_t>Characters to encode.
char_indexintCharacter slice beginning.
char_countintNumber of characters to convert.
bytesArrayPtr<uint8_t>Buffer to put characters to.
byte_indexintOutput buffer offset.

Return Value

Number of written bytes.

Encoding::GetBytes(System::Details::ArrayView<char_t>, int, int, System::Details::ArrayView<uint8_t>, int) method

Get the bytes that result from encoding a character buffer.

virtual int System::Text::Encoding::GetBytes(System::Details::ArrayView<char_t> chars, int char_index, int char_count, System::Details::ArrayView<uint8_t> bytes, int byte_index)

Arguments

ParameterTypeDescription
charsSystem::Details::ArrayView<char_t>Characters to encode.
char_indexintCharacter slice beginning.
char_countintNumber of characters to convert.
bytesSystem::Details::ArrayView<uint8_t>Buffer to put characters to.
byte_indexintOutput buffer offset.

Return Value

Number of written bytes.

Encoding::GetBytes(System::Details::StackArray<char_t, SC>&, int, int, System::Details::StackArray<uint8_t, SB>&, int) method

Get the bytes that result from encoding a character buffer.

template<std::size_t,std::size_t> int System::Text::Encoding::GetBytes(System::Details::StackArray<char_t, SC> &chars, int char_index, int char_count, System::Details::StackArray<uint8_t, SB> &bytes, int byte_index)

Arguments

ParameterTypeDescription
charsSystem::Details::StackArray<char_t, SC>&Characters to encode.
char_indexintCharacter slice beginning.
char_countintNumber of characters to convert.
bytesSystem::Details::StackArray<uint8_t, SB>&Buffer to put characters to.
byte_indexintOutput buffer offset.

Return Value

Number of written bytes.

Encoding::GetBytes(const String&, int, int, ArrayPtr<uint8_t>, int) method

Get the bytes that result from encoding a character buffer.

virtual int System::Text::Encoding::GetBytes(const String &s, int char_index, int char_count, ArrayPtr<uint8_t> bytes, int byte_index)

Arguments

ParameterTypeDescription
sconst String&String to encode.
char_indexintCharacter slice beginning.
char_countintNumber of characters to convert.
bytesArrayPtr<uint8_t>Buffer to put characters to.
byte_indexintOutput buffer offset.

Return Value

Number of written bytes.

Encoding::GetBytes(const String&) method

Get the bytes that result from encoding a character buffer.

virtual ArrayPtr<uint8_t> System::Text::Encoding::GetBytes(const String &s)

Arguments

ParameterTypeDescription
sconst String&String to encode.

Return Value

Buffer that holds representation of characters being encoded.

Encoding::GetBytes(ArrayPtr<char_t>, int, int) method

Get the bytes that result from encoding a character buffer.

virtual ArrayPtr<uint8_t> System::Text::Encoding::GetBytes(ArrayPtr<char_t> chars, int index, int count)

Arguments

ParameterTypeDescription
charsArrayPtr<char_t>Characters to encode.
indexintCharacter slice beginning.
countintNumber of characters to convert.

Return Value

Buffer that holds representation of characters being encoded.

Encoding::GetBytes(const System::Details::ArrayView<char_t>&, int, int) method

Get the bytes that result from encoding a character buffer.

virtual ArrayPtr<uint8_t> System::Text::Encoding::GetBytes(const System::Details::ArrayView<char_t> &chars, int index, int count)

Arguments

ParameterTypeDescription
charsconst System::Details::ArrayView<char_t>&Characters to encode.
indexintCharacter slice beginning.
countintNumber of characters to convert.

Return Value

Buffer that holds representation of characters being encoded.

Encoding::GetBytes(const System::Details::StackArray<char_t, N>&, int, int) method

Get the bytes that result from encoding a character buffer.

template<std::size_t> ArrayPtr<uint8_t> System::Text::Encoding::GetBytes(const System::Details::StackArray<char_t, N> &chars, int index, int count)

Arguments

ParameterTypeDescription
charsconst System::Details::StackArray<char_t, N>&Characters to encode.
indexintCharacter slice beginning.
countintNumber of characters to convert.

Return Value

Buffer that holds representation of characters being encoded.

Encoding::GetBytes(ArrayPtr<char_t>) method

Get the bytes that result from encoding a character buffer.

virtual ArrayPtr<uint8_t> System::Text::Encoding::GetBytes(ArrayPtr<char_t> chars)

Arguments

ParameterTypeDescription
charsArrayPtr<char_t>Characters to encode.

Return Value

Buffer that holds representation of characters being encoded.

Encoding::GetBytes(const char_t *, int, uint8_t *, int) method

Get the bytes that result from encoding a character buffer.

virtual int System::Text::Encoding::GetBytes(const char_t *chars, int char_count, uint8_t *bytes, int byte_count)

Arguments

ParameterTypeDescription
charsconst char_t *Characters to encode.
char_countintNumber of characters to convert.
bytesuint8_t *Buffer to put characters to.
byte_countintOutput buffer size.

Return Value

Number of written bytes.

See Also