1
1
mc/mhl/mhl_string.h
Slava Zanko 51a81ec6e3 mhl/string.c: rename to mhl_string.c
mhl/string.h: rename to mhl_string.h
mhl/memory.h:
 - Remove REGEX_MALLOC
 - avoid "alloca redefined" warning
2009-01-14 12:48:12 +02:00

26 строки
635 B
C

#ifndef __MHL_STRING_H
#define __MHL_STRING_H
#include <ctype.h>
#include <stdarg.h>
#include "../mhl/memory.h"
#define mhl_str_dup(str) ((str ? strdup(str) : strdup("")))
#define mhl_str_ndup(str,len) ((str ? strndup(str,len) : strdup("")))
#define mhl_str_len(str) ((str ? strlen(str) : 0))
inline char* mhl_str_trim(char*);
inline void mhl_str_toupper(char*);
#define __STR_CONCAT_MAX 32
/* _NEVER_ call this function directly ! */
inline char* __mhl_str_concat_hlp(const char*, ...);
#define mhl_str_concat(...) (__mhl_str_concat_hlp(__VA_ARGS__, (char*)(1)))
inline char* mhl_str_reverse(char*);
#endif // __MHL_STRING_H