diff th_string.h @ 14:e5e6370217ef

Various cleanups, additions and removals.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 30 Oct 2010 17:47:41 +0300
parents a25f5d22483e
children 1f7d8693fda8
line wrap: on
line diff
--- a/th_string.h	Fri Oct 29 13:48:31 2010 +0300
+++ b/th_string.h	Sat Oct 30 17:47:41 2010 +0300
@@ -15,6 +15,7 @@
 #include "th_util.h"
 #include <stdlib.h>
 #include <ctype.h>
+#include <stdarg.h>
 
 /* Macros
  */
@@ -41,24 +42,26 @@
 
 /* Normal NUL-terminated string functions
  */
-char    *th_stralloc(size_t);
-char    *th_strrealloc(char *, size_t);
 char    *th_strncpy(char *, const char *, size_t);
-int     th_strcasecmp(char *, char *);
-int     th_strncasecmp(char *, char *, size_t);
+int     th_strcasecmp(const char *, const char *);
+int     th_strncasecmp(const char *, const char *, size_t);
 void    th_strip_ctrlchars(char *);
 
+char    *th_strdup_vprintf(const char *, va_list);
+char    *th_strdup_printf(const char *, ...);
+
 char    *th_strdup(const char *);
-int     th_pstrcpy(char **, char *);
-int     th_pstrcat(char **, char *);
+int     th_pstrcpy(char **, const char *);
+int     th_pstrcat(char **, const char *);
 
-char    *th_findnext(char *, size_t *);
-char    *th_findsep(char *, size_t *, char);
-char    *th_findseporspace(char *, size_t *, char);
+const char    *th_findnext(const char *, size_t *);
+const char    *th_findsep(const char *, size_t *, char);
+const char    *th_findseporspace(const char *, size_t *, char);
 
-BOOL    th_strmatch(char *, char *);
-BOOL    th_strcasematch(char *, char *);
+BOOL    th_strmatch(const char *, const char *);
+BOOL    th_strcasematch(const char *, const char *);
 
+int     th_get_hex_triplet(const char *);
 
 #ifdef __cplusplus
 }