OpenersNotesSection(Spacer1)Details

MLTestUTF32Symbol() fails if the current expression on the link l is not a symbol, or if the value of the symbol does not match s.

MLTestUTF32Symbol() returns 0 in the event of an error, and a nonzero value if the function succeeds.

Use (NonWLLink[MLError(), paclet:/ref/c/MLError]) to retrieve the error code if MLTestUTF32Symbol() fails.

MLTestUTF32Symbol() will reset the stream pointer to the expression on the link just prior to calling MLTestUTF32Symbol()if the function fails. This operation behaves as if the programmer called MLCreateMark(link); MLTestUTF32Symbol(…); MLSeekToMark(…).

The UTF-32 encoded symbol s must include a byte order mark.

The length n of the UTF-32 symbol s must include the byte order mark.

MLTestUTF32Symbol() is declared in the MathLink header file (RefLink[mathlink.h, paclet:/ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

/* A function for testing the next symbol on the link */

void f(MLINK l)
{
	const unsigned int theSymbol[5];

	theSymbol[0] = 0xFEFF;
	theSymbol[1] = 'L';
	theSymbol[2] = 'i';
	theSymbol[3] = 's';
	theSymbol[4] = 't';

	if(! MLTestUTF32Symbol(l, (const unsigned int *)theSymbol,
		5))
	{ /* The next expression on the link is not List */ }
	else
	{ /* The next expression on the link is List */ }
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLTestSymbol(), paclet:/ref/c/MLTestSymbol])  ▪  (NonWLLink[MLTestUCS2Symbol(), paclet:/ref/c/MLTestUCS2Symbol])  ▪  (NonWLLink[MLTestUTF16Symbol(), paclet:/ref/c/MLTestUTF16Symbol])  ▪  (NonWLLink[MLTestUTF8Symbol(), paclet:/ref/c/MLTestUTF8Symbol])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Handling Lists, Arrays, and Other Expressions, paclet:tutorial/HandlingListsArraysAndOtherExpressions])}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}})}})