27 #ifndef ZYDIS_STRING_H
28 #define ZYDIS_STRING_H
138 #define ZYDIS_MAKE_STRING(string) \
139 { (char*)string, sizeof(string) - 1, sizeof(string) - 1 }
146 #define ZYDIS_MAKE_STATIC_STRING(string) \
147 { string, sizeof(string) - 1 }
Includes and defines some default datatypes.
uint64_t ZydisU64
Definition: CommonTypes.h:48
uint8_t ZydisU8
Definition: CommonTypes.h:45
int64_t ZydisI64
Definition: CommonTypes.h:52
ZydisU8 ZydisBool
@briefs Defines the ZydisBool datatype.
Definition: CommonTypes.h:133
size_t ZydisUSize
Definition: CommonTypes.h:53
Status code definitions and check macros.
ZydisU32 ZydisStatus
Defines the ZydisStatus datatype.
Definition: Status.h:48
ZYDIS_EXPORT ZydisStatus ZydisStringAppendDecS(ZydisString *string, ZydisI64 value, ZydisU8 paddingLength)
Formats the given signed ordinal value to its decimal text-representation and appends it to the strin...
ZYDIS_EXPORT ZydisStatus ZydisStringAppendStatic(ZydisString *string, const ZydisStaticString *text, ZydisLetterCase letterCase)
Appends the given 'ZydisStaticString' to a ZydisString.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendHexU(ZydisString *string, ZydisU64 value, ZydisU8 paddingLength, ZydisBool uppercase, const ZydisString *prefix, const ZydisString *suffix)
Formats the given unsigned ordinal value to its hexadecimal text-representation and appends it to the...
ZYDIS_EXPORT ZydisStatus ZydisStringAppend(ZydisString *string, const ZydisString *text)
Appends a ZydisString to another ZydisString.
ZYDIS_EXPORT ZydisStatus ZydisStringFinalize(ZydisString *string)
Finalizes a ZydisString struct by adding a terminating zero byte.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendDecU(ZydisString *string, ZydisU64 value, ZydisU8 paddingLength)
Formats the given unsigned ordinal value to its decimal text-representation and appends it to the str...
ZydisU8 ZydisLetterCase
Defines the ZydisLetterCase datatype.
Definition: String.h:97
ZYDIS_EXPORT ZydisStatus ZydisStringInit(ZydisString *string, char *text)
Initializes a ZydisString struct with a C-string.
struct ZydisStaticString_ ZydisStaticString
Defines the ZydisStaticString struct.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendExC(ZydisString *string, const char *text, ZydisLetterCase letterCase)
Appends the given C-string to a ZydisString, converting it to the specified letter-case.
ZydisLetterCases
Values that represent letter cases.
Definition: String.h:103
@ ZYDIS_LETTER_CASE_UPPER
Converts the given text to uppercase letters.
Definition: String.h:115
@ ZYDIS_LETTER_CASE_MAX_VALUE
Maximum value of this enum.
Definition: String.h:120
@ ZYDIS_LETTER_CASE_DEFAULT
Uses the given text "as is".
Definition: String.h:107
@ ZYDIS_LETTER_CASE_LOWER
Converts the given text to lowercase letters.
Definition: String.h:111
ZYDIS_EXPORT ZydisStatus ZydisStringAppendEx(ZydisString *string, const ZydisString *text, ZydisLetterCase letterCase)
Appends a ZydisString to another ZydisString, converting it to the specified letter-case.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendHexS(ZydisString *string, ZydisI64 value, ZydisU8 paddingLength, ZydisBool uppercase, const ZydisString *prefix, const ZydisString *suffix)
Formats the given signed ordinal value to its hexadecimal text-representation and appends it to the s...
struct ZydisString_ ZydisString
Defines the ZydisString struct.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendExStatic(ZydisString *string, const ZydisStaticString *text, ZydisLetterCase letterCase)
Appends the given 'ZydisStaticString' to a ZydisString, converting it to the specified letter-case.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendC(ZydisString *string, const char *text)
Appends the given C-string to a ZydisString.
Defines the ZydisStaticString struct.
Definition: String.h:77
ZydisU8 length
The length of the string (without 0-termination).
Definition: String.h:85
const char * buffer
The buffer that contains the actual string (0-termination is optional!).
Definition: String.h:81
Defines the ZydisString struct.
Definition: String.h:50
ZydisUSize length
The length of the string (without 0-termination).
Definition: String.h:58
ZydisUSize capacity
The total buffer capacity.
Definition: String.h:62
char * buffer
The buffer that contains the actual string (0-termination is optional!).
Definition: String.h:54