Dynatrace OneAgent SDK for C/C++
1.7.1.1
|
See onesdk_string_t for more information about SDK strings. More...
Classes | |
struct | onesdk_string_t |
Represents a reference to string data in a user specified encoding. More... | |
Typedefs | |
typedef uint16_t | onesdk_ccsid_t |
Used to store CCSID values. | |
CCSID Constants | |
#define | ONESDK_CCSID_NULL ((onesdk_ccsid_t) 0) |
Special "NULL" CCSID value. More... | |
#define | ONESDK_CCSID_ASCII ((onesdk_ccsid_t) 367) |
CCSID value for 7 bit ASCII text. | |
#define | ONESDK_CCSID_ISO8859_1 ((onesdk_ccsid_t) 819) |
CCSID value for ISO/IEC 8859-1 aka Latin-1 encoded text. | |
#define | ONESDK_CCSID_UTF8 ((onesdk_ccsid_t)1209) |
CCSID value for UTF-8 encoded text. | |
#define | ONESDK_CCSID_UTF16_BE ((onesdk_ccsid_t)1201) |
CCSID value for UTF-16 Big Endian encoded text. | |
#define | ONESDK_CCSID_UTF16_LE ((onesdk_ccsid_t)1203) |
CCSID value for UTF-16 Little Endian encoded text. | |
#define | ONESDK_CCSID_UTF16_NATIVE |
CCSID for UTF-16 text with the native endianness (either ONESDK_CCSID_UTF16_LE or ONESDK_CCSID_UTF16_BE). | |
String Constructors | |
onesdk_string_t | onesdk_str (void const *data, onesdk_size_t byte_length, onesdk_ccsid_t ccsid) |
Creates a onesdk_string_t. More... | |
onesdk_string_t | onesdk_bytestr (char const *data, onesdk_ccsid_t ccsid) |
Creates a onesdk_string_t for a byte string. More... | |
onesdk_string_t | onesdk_asciistr (char const *data) |
Creates a onesdk_string_t for an ASCII string. More... | |
onesdk_string_t | onesdk_utf8str (char const *data) |
Creates a onesdk_string_t for a UTF-8 string. More... | |
onesdk_string_t | onesdk_nullstr (void) |
Creates a onesdk_string_t designating a "null string". More... | |
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. More... | |
See onesdk_string_t for more information about SDK strings.
#define ONESDK_CCSID_NULL ((onesdk_ccsid_t) 0) |
Special "NULL" CCSID value.
Used to build "NULL strings". If ONESDK_CCSID_NULL is used in a onesdk_string_t::ccsid, onesdk_string_t::byte_length must be zero.
|
inline |
Creates a onesdk_string_t for an ASCII string.
data | Pointer to the ASCII string data. Must be NULL or point to a null-terminated buffer. |
onesdk_bytestr(data, ONESDK_CCSID_ASCII)
|
inline |
Creates a onesdk_string_t for a byte string.
data | Pointer to the string data. Must be NULL or point to a null-terminated buffer. |
ccsid | Specifies the encoding of the string data. |
This function computes the length of the string as byte_length = strlen(data)
and then builds the return value by calling onesdk_str(data, byte_length, ccsid)
.
|
inline |
Creates a onesdk_string_t designating a "null string".
onesdk_str(NULL, 0, ONESDK_CCSID_NULL)
|
inline |
Creates a onesdk_string_t.
data | See onesdk_string_t::data |
byte_length | See onesdk_string_t::byte_length |
ccsid | See onesdk_string_t::ccsid |
|
inline |
Creates a onesdk_string_t for a UTF-8 string.
data | Pointer to the UTF-8 string data. Must be NULL or point to a null-terminated buffer. |
onesdk_bytestr(data, ONESDK_CCSID_UTF8)
|
inline |
Creates a onesdk_string_t for a wchar_t
UTF-16 string using the native endianness.
data | Pointer to the UTF-16 string data. Must be NULL or point to a null-terminated buffer. |
This function is only available on Windows.
This function computes the length of the string as byte_length = wcslen(data) * 2
and then builds the return value by calling onesdk_str(data, byte_length, ONESDK_CCSID_UTF16_NATIVE)
.
data
must be terminated by a wchar_t
with value zero (=two bytes with value zero).