libxml2 2.9.1 clean sources
[tomato.git] / release / src / router / libxml2 / include / libxml / xmlstring.h
blob2036236582580a9185b25d2bc10f93cb02c29eaa
1 /*
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
9 */
11 #ifndef __XML_STRING_H__
12 #define __XML_STRING_H__
14 #include <stdarg.h>
15 #include <libxml/xmlversion.h>
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
21 /**
22 * xmlChar:
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;
30 /**
31 * BAD_CAST:
33 * Macro to cast a string to an xmlChar * when one know its safe.
35 #define BAD_CAST (xmlChar *)
38 * xmlChar handling
40 XMLPUBFUN xmlChar * XMLCALL
41 xmlStrdup (const xmlChar *cur);
42 XMLPUBFUN xmlChar * XMLCALL
43 xmlStrndup (const xmlChar *cur,
44 int len);
45 XMLPUBFUN xmlChar * XMLCALL
46 xmlCharStrndup (const char *cur,
47 int len);
48 XMLPUBFUN xmlChar * XMLCALL
49 xmlCharStrdup (const char *cur);
50 XMLPUBFUN xmlChar * XMLCALL
51 xmlStrsub (const xmlChar *str,
52 int start,
53 int len);
54 XMLPUBFUN const xmlChar * XMLCALL
55 xmlStrchr (const xmlChar *str,
56 xmlChar val);
57 XMLPUBFUN const xmlChar * XMLCALL
58 xmlStrstr (const xmlChar *str,
59 const xmlChar *val);
60 XMLPUBFUN const xmlChar * XMLCALL
61 xmlStrcasestr (const xmlChar *str,
62 const xmlChar *val);
63 XMLPUBFUN int XMLCALL
64 xmlStrcmp (const xmlChar *str1,
65 const xmlChar *str2);
66 XMLPUBFUN int XMLCALL
67 xmlStrncmp (const xmlChar *str1,
68 const xmlChar *str2,
69 int len);
70 XMLPUBFUN int XMLCALL
71 xmlStrcasecmp (const xmlChar *str1,
72 const xmlChar *str2);
73 XMLPUBFUN int XMLCALL
74 xmlStrncasecmp (const xmlChar *str1,
75 const xmlChar *str2,
76 int len);
77 XMLPUBFUN int XMLCALL
78 xmlStrEqual (const xmlChar *str1,
79 const xmlChar *str2);
80 XMLPUBFUN int XMLCALL
81 xmlStrQEqual (const xmlChar *pref,
82 const xmlChar *name,
83 const xmlChar *str);
84 XMLPUBFUN int XMLCALL
85 xmlStrlen (const xmlChar *str);
86 XMLPUBFUN xmlChar * XMLCALL
87 xmlStrcat (xmlChar *cur,
88 const xmlChar *add);
89 XMLPUBFUN xmlChar * XMLCALL
90 xmlStrncat (xmlChar *cur,
91 const xmlChar *add,
92 int len);
93 XMLPUBFUN xmlChar * XMLCALL
94 xmlStrncatNew (const xmlChar *str1,
95 const xmlChar *str2,
96 int len);
97 XMLPUBFUN int XMLCALL
98 xmlStrPrintf (xmlChar *buf,
99 int len,
100 const xmlChar *msg,
101 ...);
102 XMLPUBFUN int XMLCALL
103 xmlStrVPrintf (xmlChar *buf,
104 int len,
105 const xmlChar *msg,
106 va_list ap);
108 XMLPUBFUN int XMLCALL
109 xmlGetUTF8Char (const unsigned char *utf,
110 int *len);
111 XMLPUBFUN int XMLCALL
112 xmlCheckUTF8 (const unsigned char *utf);
113 XMLPUBFUN int XMLCALL
114 xmlUTF8Strsize (const xmlChar *utf,
115 int len);
116 XMLPUBFUN xmlChar * XMLCALL
117 xmlUTF8Strndup (const xmlChar *utf,
118 int len);
119 XMLPUBFUN const xmlChar * XMLCALL
120 xmlUTF8Strpos (const xmlChar *utf,
121 int pos);
122 XMLPUBFUN int XMLCALL
123 xmlUTF8Strloc (const xmlChar *utf,
124 const xmlChar *utfchar);
125 XMLPUBFUN xmlChar * XMLCALL
126 xmlUTF8Strsub (const xmlChar *utf,
127 int start,
128 int len);
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);
137 #ifdef __cplusplus
139 #endif
140 #endif /* __XML_STRING_H__ */