MQERETURN osaMQeString_new(MQeExceptBlock* pExceptBlock, MQEVOID* pInputBuffer, MQETYPEOFSTRING type, MQeStringHndl * phNewString );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. The type parameter tells the function what format the input buffer is in.
MQERETURN osaMQeString_delete(MQeExceptBlock* pExceptBlock, MQeString_* pString );This function destroys an MQeString object that was created using osaMQeString_new, or MQeString_duplicate, or MQeString_getMQeSubstring
MQERETURN osaMQeString_get(MQeExceptBlock* pExceptBlock, MQEVOID* pOutputBuffer, MQEINT32* pBufferLength, MQETYPEOFSTRING requiredType, MQECONST MQeStringHndl hString );This function populates a character buffer with the contents of an MQeString performing conversion wherever necessary. Only simple conversions are carried out. No code page conversion is attempted. For example, if an SBCS string has been put into the string, then trying to get the data out as DBCS (Unicode) data works correctly. If the data was put in as DBCS however, and you try to get the data out as SBCS, this only works if the data does not have any values that cannot be represented with a single byte. When get() is used for SBCS, DBCS, or QBCS, each character is represented by its Unicode code point value.
MQERETURN osaMQeString_getSubstring(MQeExceptBlock* pExceptBlock, MQEVOID* pOutputBuffer, MQEINT32* pBufferLength, MQETYPEOFSTRING requiredType, MQECONST MQeStringHndl hString, MQEINT32 from, MQEINT32 to );This function is very similar to osaMQeString_get except that it only gets a substring (from from to to inclusive).
MQERETURN osaMQeString_getMQeSubstring(MQeExceptBlock* pExceptBlock, MQeStringHndl * phOutput, MQECONST MQeStringHndl hString, MQEINT32 from, MQEINT32 to );This function is very similar to osaMQeString_getSubstring except it returns its result as an MQeString.
MQERETURN osaMQeString_duplicate(MQeExceptBlock * pExceptBlock, MQeStringHndl * phNewString, MQECONST MQeStringHndl hString );This function duplicates an MQeString.
MQERETURN osaMQeString_codePointSize(MQeExceptBlock* pExceptBlock, MQEINT32 * pSize, MQECONST MQeStringHndl hString );This function finds the memory size (in bytes) required for the largest character in the string.
MQERETURN osaMQeString_getCharLocation( MQeExceptBlock* pExceptBlock, MQEINT32* pOutIndex, MQECONST MQeStringHndl hString, MQECHAR32 charToFind, MQEINT32 startFrom, MQEBOOL searchForward );This function returns the location index (starting from 0) of the first appearance of a specified character, specified as its Unicode code point value. You can specify the starting point of your search and the direction of the search.
MQERETURN osaMQeString_isAsciiOnly(MQeExceptBlock* pExceptBlock, MQEBOOL* pIsAsciiOnly, MQECONST MQeString_* pString );This function determines whether the string contains any non-invariant ASCII characters.
MQERETURN osaMQeString_equalTo(MQeExceptBlock* pExceptBlock, MQEBOOL* pIsEqual, MQECONST MQeString_* pString, MQECONST MQeString_* pEqualToString );This function determines whether two strings are equivalent.
MQERETURN osaMQeString_isNull(MQeExceptBlock * pExceptBlock, MQEBOOL * pIsNull, MQECONST MQeStringHndl hString );This function determines if a string is a null string. A a NULL handle is considered as a null string as well.
The Single Byte Character Set (SBCS) is the standard mode of operating with C on an ASCII code page. Java™ works in Unicode only and there may be platforms to support, that do not load an SBCS code page, for example in some countries languages are represented in DBCS. As it does not include the character pointer, the string item allows you to create strings on an ASCII machine without considering Unicode requirements. MQe carries out any necessary conversions. Use the UTF-8 representation of the string as this can cope with any character representation and does the conversion for you. Once created, an MQeString cannot be altered. However, a number of functions facilitate the use of the MQeString type. You can also create constant MQeStrings in a similar manner to using #define NAME "mystring". Using MQeString ensures portability of the application.