1 #ifndef __STRBUF_H__ 2 #define __STRBUF_H__ 3 4 #include <sys/types.h> 5 #include <string.h> 6 7 int prefixcmp(const char *str, const char *prefix); 8 9 #ifndef HAVE_STRLCPY 10 extern size_t strlcat(char *dest, const char *src, size_t count); 11 extern size_t strlcpy(char *dest, const char *src, size_t size); 12 #endif 13 14 /* some inline functions */ 15 skip_prefix(const char * str,const char * prefix)16static inline const char *skip_prefix(const char *str, const char *prefix) 17 { 18 size_t len = strlen(prefix); 19 return strncmp(str, prefix, len) ? NULL : str + len; 20 } 21 22 #endif 23