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 API where a string is required.
Data Structures | |
struct | MQeStaticString_st |
structure for external static constant String. More... | |
Defines | |
#define | EXTERNAL_UTF8_STATIC_MQESTRING |
Initial signature of external MQeString. | |
#define | MQESTRING_CURRENT_VERSION |
Current version number of MQeString. | |
#define | CREATE_UTF8_STATIC_MQESTRING(var, val) |
This macro creates a static MQeString variable (structure). Its address can be used as a value for an MQeStringHndl (you may need to cast it). | |
Typedefs | |
typedef MQeStaticString_st | MQeStaticString |
type definition of struct MQeStaticString_st | |
Functions | |
MQERETURN | mqeString_newChar8 (MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR *pInput) |
Creates a new MQeString and copies/converts the MQECHAR string pInput (each array element represents a Unicode code point) into the created MQeString. | |
MQERETURN | mqeString_newChar16 (MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR16 *pInput) |
Creates a new MQeString and copies/converts the MQECHAR16 string pInput (each array element represents a Unicode code point) into the created MQeString. | |
MQERETURN | mqeString_newChar32 (MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR32 *pInput) |
Creates a new MQeString and copies/converts the MQECHAR32 string pInput (each array element represents a Unicode code point) into the created MQeString. | |
MQERETURN | mqeString_newUtf8 (MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR *pInput) |
Creates a new MQeString and copies/converts the Unicode UTF-8 string pInput into the created MQeString. | |
MQERETURN | mqeString_newUtf16 (MQeExceptBlock *pErrStruct, MQeStringHndl *phNewString, MQECONST MQECHAR16 *pInput) |
Creates a new MQeString and copies the Unicode UTF-16 string pInput (each array element represents a Unicode code point) into the created MQeString.It also supports surrogate pairs. | |
MQERETURN | mqeString_free (MQeStringHndl hString, MQeExceptBlock *pErrStruct) |
Frees the MQeString pointed to by hString. | |
MQERETURN | mqeString_getChar8 (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQECHAR *pOutputString, MQEINT32 *pSize) |
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the MQECHAR buffer pointed to by pOutputString. The string will be stored in the C single byte string format. An error is raised if the string can not be converted into a single byte C string. | |
MQERETURN | mqeString_getChar16 (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQECHAR16 *pOutputString, MQEINT32 *pSize) |
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the MQECHAR16 buffer pointed to by pOutputString. The string will be stored in the UNICODE double-byte string format. | |
MQERETURN | mqeString_getChar32 (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQECHAR32 *pOutputString, MQEINT32 *pSize) |
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the MQECHAR32 buffer pointed to by pOutputString. The string will be stored in the UNICODE quad-byte string format. | |
MQERETURN | mqeString_getUtf8 (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQECHAR *pOutputString, MQEINT32 *pSize) |
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the buffer pointed to by pOutputString. The string will be stored in the UTF-8 format. | |
MQERETURN | mqeString_getUtf16 (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQECHAR16 *pOutputString, MQEINT32 *pSize) |
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the buffer pointed to by pOutputString. The string will be stored in the UTF-16 format. | |
MQERETURN | mqeString_equalTo (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQEBOOL *pIsEqual, MQECONST MQeStringHndl hEqualToString) |
Compare the text content of hString with that of hEqualToString for exact equality (storage format independent). | |
MQERETURN | mqeString_codePointSize (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQEINT32 *pSize) |
Find the number of bytes required to store the largest code point in the string. | |
MQERETURN | mqeString_isAsciiOnly (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQEBOOL *pIsAsciiOnly) |
Check if hString contains Ascii characters only, i.e. 32 <= val < 128 (can be represented in multi-byte form). | |
MQERETURN | mqeString_isNull (MQeStringHndl hString, MQeExceptBlock *pErrStruct, MQEBOOL *pIsNull) |
Check if hString contains a NULL string. | |
MQERETURN | mqeString_cat (MQeExceptBlock *pExceptBlock, MQeStringHndl *phNewString, MQECONST MQeStringHndl hString1, MQECONST MQeStringHndl hString2) |
This function creates a new string by concatenating two MQeStrings. | |
MQERETURN | mqeString_catAll (MQeExceptBlock *pExceptBlock, MQeStringHndl *phNewString, MQECONST MQeStringHndl *phStrings, MQEINT32 noOfStrings) |
This function creates a new string by concatenating an array of MQeStrings. | |
MQERETURN | mqeString_duplicate (MQeExceptBlock *pExceptBlock, MQeStringHndl *phNewString, MQECONST MQeStringHndl hString) |
This is a macro for duplicating an MQeString (only dynamic strings are actually duplicated). | |
MQERETURN | mqeString_getSubMQeString (MQeStringHndl hString, MQeExceptBlock *pExceptBlock, MQeStringHndl *phOutString, MQEINT32 from, MQEINT32 to) |
This function creates an MQeString whose content is the substring of hString. | |
MQERETURN | mqeString_getCharLocation (MQeStringHndl hString, MQeExceptBlock *pExceptBlock, MQEINT32 *pOutIndex, MQECHAR32 charToFind, MQEINT32 startFrom, MQEBOOL searchForward) |
This function searches an MQeString for a specific character and returns the index of the character found. |
|
Initial signature of external MQeString.
This is the signature used in CREATE_UTF8_STATIC_MQESTRING to indicate a static string variable |
|
This macro creates a static MQeString variable (structure). Its address can be used as a value for an MQeStringHndl (you may need to cast it).
This is the only construct a user needs to create an MQeStaticString. For example: CREATE_UTF8_STATIC_MQESTRING(s,"a string")
|
|
type definition of struct MQeStaticString_st
This is the type of variable created by CREATE_UTF8_STATIC_MQESTRING. |
|
Creates a new MQeString and copies/converts the MQECHAR string pInput (each array element represents a Unicode code point) into the created MQeString.
|
|
Creates a new MQeString and copies/converts the MQECHAR16 string pInput (each array element represents a Unicode code point) into the created MQeString.
|
|
Creates a new MQeString and copies/converts the MQECHAR32 string pInput (each array element represents a Unicode code point) into the created MQeString.
|
|
Creates a new MQeString and copies/converts the Unicode UTF-8 string pInput into the created MQeString.
|
|
Creates a new MQeString and copies the Unicode UTF-16 string pInput (each array element represents a Unicode code point) into the created MQeString.It also supports surrogate pairs.
|
|
Frees the MQeString pointed to by hString.
|
|
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the MQECHAR buffer pointed to by pOutputString. The string will be stored in the C single byte string format. An error is raised if the string can not be converted into a single byte C string.
|
|
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the MQECHAR16 buffer pointed to by pOutputString. The string will be stored in the UNICODE double-byte string format.
|
|
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the MQECHAR32 buffer pointed to by pOutputString. The string will be stored in the UNICODE quad-byte string format.
|
|
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the buffer pointed to by pOutputString. The string will be stored in the UTF-8 format.
|
|
Copies (converts if the internal storage format is different) the text content of the MQeString hString into the buffer pointed to by pOutputString. The string will be stored in the UTF-16 format.
|
|
Compare the text content of hString with that of hEqualToString for exact equality (storage format independent).
|
|
Find the number of bytes required to store the largest code point in the string.
|
|
Check if hString contains Ascii characters only, i.e. 32 <= val < 128 (can be represented in multi-byte form).
|
|
Check if hString contains a NULL string.
|
|
This function creates a new string by concatenating two MQeStrings.
|
|
This function creates a new string by concatenating an array of MQeStrings.
|
|
This is a macro for duplicating an MQeString (only dynamic strings are actually duplicated).
|
|
This function creates an MQeString whose content is the substring of hString.
|
|
This function searches an MQeString for a specific character and returns the index of the character found.
|