System::String::ToByteArray 方法

String::ToByteArray method

将字符串或子字符串转换为字节数组。

ArrayPtr<uint8_t> System::String::ToByteArray(int32_t startIndex=0, int32_t length=INT32_MAX, bool LE=true) const
参数类型描述
startIndexint32_t子字符串的起始索引。
长度int32_t子字符串的长度。
LEbool如果为 true,则使用小端序对字符进行编码;否则使用大端序。

ReturnValue

Array containing bytes representing characters of the string.

另见