mxIsChar (C and Fortran) - Determine whether input is string mxArray

C Syntax

#include "matrix.h"
bool mxIsChar(const mxArray *pm);

Fortran Syntax

integer*4 mxIsChar(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray

Returns

Logical 1 (true) if pm points to an array having the class mxCHAR_CLASS, and logical 0 (false) otherwise.

Description

Use mxIsChar to determine whether pm points to string mxArray.

In C, calling mxIsChar is equivalent to calling:

mxGetClassID(pm) == mxCHAR_CLASS

In Fortran, calling mxIsChar is equivalent to calling:

mxGetClassName(pm) .eq. 'char'

C Examples

See phonebook.c and revord.c in the refbook subdirectory of the examples directory.

For additional examples, see mxcreatecharmatrixfromstr.c, mxislogical.c, and mxmalloc.c in the mx subdirectory of the examples directory.

See Also

mxIsClass, mxGetClassID

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS