System::String::ToByteArray method

String::ToByteArray method

Converts string or substring to array of bytes.

ArrayPtr<uint8_t> System::String::ToByteArray(int32_t startIndex=0, int32_t length=INT32_MAX, bool LE=true) const
ParameterTypeDescription
startIndexint32_tSubstring start index.
lengthint32_tSubstring length.
LEboolIf true, encode characters using little endianness; otherwise, use big endianness.

ReturnValue

Array containing bytes representing characters of the string.

See Also