17 #ifndef ONESDK_STRING_H_INCLUDED 18 #define ONESDK_STRING_H_INCLUDED 59 typedef struct onesdk_string {
79 #define ONESDK_CCSID_NULL ((onesdk_ccsid_t) 0) 81 #define ONESDK_CCSID_ASCII ((onesdk_ccsid_t) 367) 82 #define ONESDK_CCSID_ISO8859_1 ((onesdk_ccsid_t) 819) 83 #define ONESDK_CCSID_UTF8 ((onesdk_ccsid_t)1209) 84 #define ONESDK_CCSID_UTF16_BE ((onesdk_ccsid_t)1201) 85 #define ONESDK_CCSID_UTF16_LE ((onesdk_ccsid_t)1203) 90 #if defined(ONESDK_BUILD_DOC) 91 #define ONESDK_CCSID_UTF16_NATIVE 94 #if defined(ONESDK_LITTLE_ENDIAN) 95 #define ONESDK_CCSID_UTF16_NATIVE ONESDK_CCSID_UTF16_LE 98 #if defined(ONESDK_BIG_ENDIAN) 99 #define ONESDK_CCSID_UTF16_NATIVE ONESDK_CCSID_UTF16_BE 174 #if (defined(_WIN32) && defined(ONESDK_CCSID_UTF16_NATIVE)) || defined(ONESDK_BUILD_DOC) Defines common types/constants/macros. Applications should not include this file directly.
#define ONESDK_CCSID_UTF8
CCSID value for UTF-8 encoded text.
Definition: onesdk_string.h:83
#define ONESDK_CCSID_ASCII
CCSID value for 7 bit ASCII text.
Definition: onesdk_string.h:81
onesdk_string_t onesdk_utf8str(char const *data)
Creates a onesdk_string_t for a UTF-8 string.
Definition: onesdk_string.h:160
onesdk_string_t onesdk_str(void const *data, onesdk_size_t byte_length, onesdk_ccsid_t ccsid)
Creates a onesdk_string_t.
Definition: onesdk_string.h:119
onesdk_string_t onesdk_wstr(wchar_t const *data)
Creates a onesdk_string_t for a wchar_t UTF-16 string using the native endianness.
Definition: onesdk_string.h:190
onesdk_string_t onesdk_asciistr(char const *data)
Creates a onesdk_string_t for an ASCII string.
Definition: onesdk_string.h:149
#define ONESDK_CCSID_UTF16_NATIVE
CCSID for UTF-16 text with the native endianness (either ONESDK_CCSID_UTF16_LE or ONESDK_CCSID_UTF16_...
Definition: onesdk_string.h:91
Represents a reference to string data in a user specified encoding.
Definition: onesdk_string.h:59
onesdk_string_t onesdk_nullstr(void)
Creates a onesdk_string_t designating a "null string".
Definition: onesdk_string.h:170
onesdk_string_t onesdk_bytestr(char const *data, onesdk_ccsid_t ccsid)
Creates a onesdk_string_t for a byte string.
Definition: onesdk_string.h:138
void const * data
Pointer to the beginning of the string data. May be NULL if byte_length is zero.
Definition: onesdk_string.h:60
onesdk_ccsid_t ccsid
Specifies the encoding of the string data.
Definition: onesdk_string.h:62
size_t onesdk_size_t
Unsigned integer type used for sizes (e.g. array sizes) and counts.
Definition: onesdk_config.h:220
#define ONESDK_CCSID_NULL
Special "NULL" CCSID value.
Definition: onesdk_string.h:79
onesdk_size_t byte_length
The length of the buffer pointed to by data, in bytes.
Definition: onesdk_string.h:61
uint16_t onesdk_ccsid_t
Used to store CCSID values.
Definition: onesdk_string.h:44