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).
29 typedef unsigned char xmlChar
;
34 * Macro to cast a string to an xmlChar * when one know its safe.
36 #define BAD_CAST (xmlChar *)
41 XMLPUBFUN xmlChar
* XMLCALL
42 xmlStrdup (const xmlChar
*cur
);
43 XMLPUBFUN xmlChar
* XMLCALL
44 xmlStrndup (const xmlChar
*cur
,
46 XMLPUBFUN xmlChar
* XMLCALL
47 xmlCharStrndup (const char *cur
,
49 XMLPUBFUN xmlChar
* XMLCALL
50 xmlCharStrdup (const char *cur
);
51 XMLPUBFUN xmlChar
* XMLCALL
52 xmlStrsub (const xmlChar
*str
,
55 XMLPUBFUN
const xmlChar
* XMLCALL
56 xmlStrchr (const xmlChar
*str
,
58 XMLPUBFUN
const xmlChar
* XMLCALL
59 xmlStrstr (const xmlChar
*str
,
61 XMLPUBFUN
const xmlChar
* XMLCALL
62 xmlStrcasestr (const xmlChar
*str
,
65 xmlStrcmp (const xmlChar
*str1
,
68 xmlStrncmp (const xmlChar
*str1
,
72 xmlStrcasecmp (const xmlChar
*str1
,
75 xmlStrncasecmp (const xmlChar
*str1
,
79 xmlStrEqual (const xmlChar
*str1
,
82 xmlStrQEqual (const xmlChar
*pref
,
86 xmlStrlen (const xmlChar
*str
);
87 XMLPUBFUN xmlChar
* XMLCALL
88 xmlStrcat (xmlChar
*cur
,
90 XMLPUBFUN xmlChar
* XMLCALL
91 xmlStrncat (xmlChar
*cur
,
94 XMLPUBFUN xmlChar
* XMLCALL
95 xmlStrncatNew (const xmlChar
*str1
,
99 xmlStrPrintf (xmlChar
*buf
,
103 XMLPUBFUN
int XMLCALL
104 xmlStrVPrintf (xmlChar
*buf
,
109 XMLPUBFUN
int XMLCALL
110 xmlGetUTF8Char (const unsigned char *utf
,
112 XMLPUBFUN
int XMLCALL
113 xmlCheckUTF8 (const unsigned char *utf
);
114 XMLPUBFUN
int XMLCALL
115 xmlUTF8Strsize (const xmlChar
*utf
,
117 XMLPUBFUN xmlChar
* XMLCALL
118 xmlUTF8Strndup (const xmlChar
*utf
,
120 XMLPUBFUN
const xmlChar
* XMLCALL
121 xmlUTF8Strpos (const xmlChar
*utf
,
123 XMLPUBFUN
int XMLCALL
124 xmlUTF8Strloc (const xmlChar
*utf
,
125 const xmlChar
*utfchar
);
126 XMLPUBFUN xmlChar
* XMLCALL
127 xmlUTF8Strsub (const xmlChar
*utf
,
130 XMLPUBFUN
int XMLCALL
131 xmlUTF8Strlen (const xmlChar
*utf
);
132 XMLPUBFUN
int XMLCALL
133 xmlUTF8Size (const xmlChar
*utf
);
134 XMLPUBFUN
int XMLCALL
135 xmlUTF8Charcmp (const xmlChar
*utf1
,
136 const xmlChar
*utf2
);
141 #endif /* __XML_STRING_H__ */