2 * Summary: set of routines to process strings
3 * Description: type and interfaces needed for the internal string handling
4 * of the library, especially UTF8 processing.
6 * Copy: See Copyright for the status of this software.
8 * Author: Daniel Veillard
11 #ifndef __XML_STRING_H__
12 #define __XML_STRING_H__
15 #include <libxml/xmlversion.h>
24 * This is a basic byte in an UTF-8 encoded string.
25 * It's unsigned allowing to pinpoint case where char * are assigned
26 * to xmlChar * (possibly making serialization back impossible).
28 typedef unsigned char xmlChar;
33 * Macro to cast a string to an xmlChar * when one know its safe.
35 #define BAD_CAST (xmlChar *)
40 XMLPUBFUN xmlChar * XMLCALL
41 xmlStrdup (const xmlChar *cur);
42 XMLPUBFUN xmlChar * XMLCALL
43 xmlStrndup (const xmlChar *cur,
45 XMLPUBFUN xmlChar * XMLCALL
46 xmlCharStrndup (const char *cur,
48 XMLPUBFUN xmlChar * XMLCALL
49 xmlCharStrdup (const char *cur);
50 XMLPUBFUN xmlChar * XMLCALL
51 xmlStrsub (const xmlChar *str,
54 XMLPUBFUN const xmlChar * XMLCALL
55 xmlStrchr (const xmlChar *str,
57 XMLPUBFUN const xmlChar * XMLCALL
58 xmlStrstr (const xmlChar *str,
60 XMLPUBFUN const xmlChar * XMLCALL
61 xmlStrcasestr (const xmlChar *str,
64 xmlStrcmp (const xmlChar *str1,
67 xmlStrncmp (const xmlChar *str1,
71 xmlStrcasecmp (const xmlChar *str1,
74 xmlStrncasecmp (const xmlChar *str1,
78 xmlStrEqual (const xmlChar *str1,
81 xmlStrQEqual (const xmlChar *pref,
85 xmlStrlen (const xmlChar *str);
86 XMLPUBFUN xmlChar * XMLCALL
87 xmlStrcat (xmlChar *cur,
89 XMLPUBFUN xmlChar * XMLCALL
90 xmlStrncat (xmlChar *cur,
93 XMLPUBFUN xmlChar * XMLCALL
94 xmlStrncatNew (const xmlChar *str1,
98 xmlStrPrintf (xmlChar *buf,
102 XMLPUBFUN int XMLCALL
103 xmlStrVPrintf (xmlChar *buf,
108 XMLPUBFUN int XMLCALL
109 xmlGetUTF8Char (const unsigned char *utf,
111 XMLPUBFUN int XMLCALL
112 xmlCheckUTF8 (const unsigned char *utf);
113 XMLPUBFUN int XMLCALL
114 xmlUTF8Strsize (const xmlChar *utf,
116 XMLPUBFUN xmlChar * XMLCALL
117 xmlUTF8Strndup (const xmlChar *utf,
119 XMLPUBFUN const xmlChar * XMLCALL
120 xmlUTF8Strpos (const xmlChar *utf,
122 XMLPUBFUN int XMLCALL
123 xmlUTF8Strloc (const xmlChar *utf,
124 const xmlChar *utfchar);
125 XMLPUBFUN xmlChar * XMLCALL
126 xmlUTF8Strsub (const xmlChar *utf,
129 XMLPUBFUN int XMLCALL
130 xmlUTF8Strlen (const xmlChar *utf);
131 XMLPUBFUN int XMLCALL
132 xmlUTF8Size (const xmlChar *utf);
133 XMLPUBFUN int XMLCALL
134 xmlUTF8Charcmp (const xmlChar *utf1,
135 const xmlChar *utf2);
140 #endif /* __XML_STRING_H__ */