diff options
Diffstat (limited to 'StringUtils.h')
-rw-r--r-- | StringUtils.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/StringUtils.h b/StringUtils.h index 936617ff..5a1af9ad 100644 --- a/StringUtils.h +++ b/StringUtils.h @@ -9,6 +9,9 @@ in the source distribution for its full text. #include <stdio.h> +#include "Macros.h" + + #define String_startsWith(s, match) (strncmp((s),(match),strlen(match)) == 0) #define String_contains_i(s1, s2) (strcasestr(s1, s2) != NULL) @@ -31,4 +34,12 @@ char* String_getToken(const char* line, const unsigned short int numMatch); char* String_readLine(FILE* fd); +ATTR_FORMAT(printf, 2, 3) +int xAsprintf(char **strp, const char* fmt, ...); + +ATTR_FORMAT(printf, 3, 4) +int xSnprintf(char *buf, int len, const char* fmt, ...); + +char* xStrdup(const char* str) ATTR_NONNULL; + #endif |