44 #ifndef STR_H_0212011305
45 #define STR_H_0212011305
63 #define scew_memcpy(dst, src, n) memcpy (dst, src, sizeof (XML_Char) * (n))
69 #define scew_memmove(dst, src, n) memmove (dst, src, sizeof (XML_Char) * (n))
71 #ifdef XML_UNICODE_WCHAR_T
76 #define _XT(str) L##str
78 #define scew_printf wprintf
79 #define scew_fprintf fwprintf
80 #define scew_vfprintf vfwprintf
81 #define scew_fputs fputws
82 #define scew_fgets fgetws
83 #define scew_fputc fputwc
84 #define scew_fgetc fgetwc
86 #define scew_strspn(wcs, accept) wcsspn (wcs, accept)
87 #define scew_strcpy(dest, src) wcscpy (dest, src)
88 #define scew_strcat(dest, src) wcscat (dest, src)
89 #define scew_strncpy(dest, src, n) wcsncpy (dest, src, n)
90 #define scew_strncat(dest, src, n) wcsncat (dest, src, n)
91 #define scew_strlen(s) wcslen (s)
93 #define scew_isalnum(c) iswalnum ((c))
94 #define scew_isalpha(c) iswalpha ((c))
95 #define scew_iscntrl(c) iswcntrl ((c))
96 #define scew_isdigit(c) iswdigit ((c))
97 #define scew_isxdigit(c) iswxdigit ((c))
98 #define scew_isgraph(c) iswgraph ((c))
99 #define scew_islower(c) iswlower ((c))
100 #define scew_isupper(c) iswupper ((c))
101 #define scew_isprint(c) iswprint ((c))
102 #define scew_ispunct(c) iswpunct ((c))
103 #define scew_isspace(c) iswspace ((c))
117 #define scew_printf printf
122 #define scew_fprintf fprintf
127 #define scew_vfprintf vfprintf
132 #define scew_fputs fputs
137 #define scew_fgets fgets
142 #define scew_fputc fputc
147 #define scew_fgetc fgetc
154 #define scew_strspn(s, accept) strspn (s, accept)
159 #define scew_strcpy(dest, src) strcpy (dest, src)
164 #define scew_strcat(dest, src) strcat (dest, src)
169 #define scew_strncpy(dest, src, n) strncpy (dest, src, (n))
174 #define scew_strncat(dest, src, n) strncat (dest, src, (n))
179 #define scew_strlen(s) strlen (s)
186 #define scew_isalnum(c) isalnum ((unsigned char)(c))
191 #define scew_isalpha(c) isalpha ((unsigned char)(c))
196 #define scew_iscntrl(c) iscntrl ((unsigned char)(c))
201 #define scew_isdigit(c) isdigit ((unsigned char)(c))
206 #define scew_isxdigit(c) isxdigit ((unsigned char)(c))
211 #define scew_isgraph(c) isgraph ((unsigned char)(c))
216 #define scew_islower(c) islower ((unsigned char)(c))
221 #define scew_isupper(c) isupper ((unsigned char)(c))
226 #define scew_isprint(c) isprint ((unsigned char)(c))
231 #define scew_ispunct(c) ispunct ((unsigned char)(c))
236 #define scew_isspace(c) isspace ((unsigned char)(c))
253 extern SCEW_API
int scew_strcmp (XML_Char
const *a, XML_Char
const *b);
264 extern SCEW_API XML_Char*
scew_strdup (XML_Char
const *src);
SCEW shared library support.
unsigned char scew_bool
This should be defined using stdbool.h when C99 is available.
Definition: bool.h:35
SCEW_API int scew_strcmp(XML_Char const *a, XML_Char const *b)
Compares the two given strings s1 and s2.
SCEW_API XML_Char * scew_strdup(XML_Char const *src)
Creates a new copy of the given string.
SCEW_API scew_bool scew_isempty(XML_Char const *src)
Tells whether the given string is empty.
SCEW_API XML_Char * scew_strescape(XML_Char const *src)
Escapes the given string for XML.
SCEW_API void scew_strtrim(XML_Char *src)
Trims off extra spaces from the beginning and end of a string.
SCEW boolean type declaration.