mxArrayToUTF8String (C) - Array to string in UTF-8 encoding - MATLAB (original) (raw)
Main Content
Array to string in UTF-8 encoding
C Syntax
#include "matrix.h" char *mxArrayToUTF8String(const mxArray *array_ptr);
Arguments
array_ptr
Pointer to mxCHAR
array.
Returns
C-style string in UTF-8 encoding. Returns NULL
on failure. Possible reasons for failure include out of memory and specifying an array that is not anmxCHAR
array.
Description
Call mxArrayToUTF8String
to copy the character data of anmxCHAR
array into a C-style string. The data is stored in column-major order. If the array contains multiple rows, the rows are copied column-wise into a single array.
Version History
Introduced in R2015a
The mxArrayToUTF8String
function returns UTF-8 encoded data.