The MQeString class contains user defined and System Strings and is an abstraction of character strings. It allows a string to be created or retrieved in a number of formats such as arrays containing Unicode code points (each code point stored in a 1, 2, or 4 bytes memory space) and UTF-8. The current implementation only supports these external formats.
MQeString is used throughout the C-API where a string is required.
A number of constant strings are provided. These are defined in the following header files:
MQERETURN mqeString_newChar8(MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR *pInput)
MQERETURN mqeString_newChar16(MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR16 *pInput)
MQERETURN mqeString_newChar32(MQeExceptBlock *pErrStruct, MQeStringHndl*phNewString, MQECONST MQECHAR32 *pInput)
MQERETURN mqeString_newUtf8(MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR *pInput)
This function creates a new MQeString object from a buffer containing character data. The data can be in a number of supported formats including, null terminated single byte character arrays (i.e. normal C char* strings), null terminated double-byte Unicode character arrays, null terminated quad-byte Unicode character arrays, and null terminated UTF-8 arrays.
MQERETURN mqeString_free(MQeStringHndl hString, MQeExceptBlock *pErrStruct)
This function destroys an MQeString object that was created using mqeString_new, or returned by any other function.
MQERETURN mqeString_newChar8(MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR *pInput)
MQERETURN mqeString_newChar16(MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR16 *pInput)
MQERETURN mqeString_newChar32(MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR32 *pInput)
MQERETURN mqeString_newUtf8(MQeExceptBlock *pErrStruct, MQeStringHndl*phNewString, MQECONST MQECHAR *pInput)
MQERETURN mqeString_isAsciiOnly(MQeStringHnld hString,MQeExceptBlock *pErrStruct,MQEBOOL *pisAsciiOnly)
This function determines whether the string contains any non-invariant ASCII characters.
MQERETURN mqeString_equalTo(MQeStringHndl hString,MQeExceptBlock *pErrStruct,MQEBOOL *pIsEqual, MQECONST MQeStringHndl hEqualToString)
This function determines whether two strings are equivalent.
MQERETURN mqeString_isNull(MQeStringHndl hString, MQeExceptBlock *pErrStruct,MQEBOOL *pIsNull)
This function determines if a string is a null string (a NULL handle is also considered as a null string).
MQERETURN mqeString_codePOintSize(MQeStringHndl hString, MQeExceptBlock *pErrStruct,MQEINT32 *pSize)
This function finds the number of bytes required to store the largest code point in the string.