Main Content
mxArrayToString (C)
Array to string
C Syntax
#include "matrix.h" char *mxArrayToString(const mxArray *array_ptr);
Description
Call mxArrayToString
to copy the character data of an
mxCHAR
array into a C-style string. The C-style string is always
terminated with a NULL
character and stored in column-major order. If the
array contains multiple rows, then the rows are copied column-wise into a single array.
This function is similar to mxGetString
, except that:
mxArrayToString
does not require the length of the string as an input.As of R2022a,
mxArrayToString
returns a UTF-8 encoded string.
Input Arguments
Output Arguments
Examples
See these examples in
:matlabroot
/extern/examples/mex
See these examples in
:matlabroot
/extern/examples/mx
Version History
Introduced before R2006a