1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_xmlstring.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,150 @@
1.4 +/*
1.5 + * Summary: set of routines to process strings
1.6 + * Description: type and interfaces needed for the internal string handling
1.7 + * of the library, especially UTF8 processing.
1.8 + *
1.9 + * Copy: See Copyright for the status of this software.
1.10 + *
1.11 + * Author: Daniel Veillard
1.12 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.13 + */
1.14 +
1.15 +/** @file
1.16 +@publishedAll
1.17 +@released
1.18 +*/
1.19 +
1.20 +#ifndef XML_STRING_H
1.21 +#define XML_STRING_H
1.22 +
1.23 +#include <stdarg.h>
1.24 +#include <stdapis/libxml2/libxml2_xmlversion.h>
1.25 +
1.26 +#ifdef __cplusplus
1.27 +extern "C" {
1.28 +#endif
1.29 +
1.30 +/**
1.31 + * xmlChar:
1.32 + *
1.33 + * This is a basic byte in an UTF-8 encoded string.
1.34 + * It's unsigned allowing to pinpoint case where char * are assigned
1.35 + * to xmlChar * (possibly making serialization back impossible).
1.36 + */
1.37 +
1.38 +typedef unsigned char xmlChar;
1.39 +
1.40 +/**
1.41 + * BAD_CAST:
1.42 + *
1.43 + * Macro to cast a string to an xmlChar * when one know its safe.
1.44 + */
1.45 +#define BAD_CAST (xmlChar *)
1.46 +
1.47 +/*
1.48 + * xmlChar handling
1.49 + */
1.50 +XMLPUBFUN xmlChar* XMLCALL
1.51 + xmlStrdup (const xmlChar *cur);
1.52 +XMLPUBFUN xmlChar* XMLCALL
1.53 + xmlStrndup (const xmlChar *cur,
1.54 + int len);
1.55 +XMLPUBFUN xmlChar* XMLCALL
1.56 + xmlCharStrndup (const char *cur,
1.57 + int len);
1.58 +XMLPUBFUN xmlChar* XMLCALL
1.59 + xmlCharStrdup (const char *cur);
1.60 +XMLPUBFUN xmlChar* XMLCALL
1.61 + xmlStrsub (const xmlChar *str,
1.62 + int start,
1.63 + int len);
1.64 +XMLPUBFUN const xmlChar* XMLCALL
1.65 + xmlStrchr (const xmlChar *str,
1.66 + xmlChar val);
1.67 +XMLPUBFUN const xmlChar* XMLCALL
1.68 + xmlStrstr (const xmlChar *str,
1.69 + const xmlChar *val);
1.70 +XMLPUBFUN const xmlChar* XMLCALL
1.71 + xmlStrcasestr (const xmlChar *str,
1.72 + xmlChar *val);
1.73 +XMLPUBFUN int XMLCALL
1.74 + xmlStrcmp (const xmlChar *str1,
1.75 + const xmlChar *str2);
1.76 +XMLPUBFUN int XMLCALL
1.77 + xmlStrncmp (const xmlChar *str1,
1.78 + const xmlChar *str2,
1.79 + int len);
1.80 +XMLPUBFUN int XMLCALL
1.81 + xmlStrcasecmp (const xmlChar *str1,
1.82 + const xmlChar *str2);
1.83 +XMLPUBFUN int XMLCALL
1.84 + xmlStrncasecmp (const xmlChar *str1,
1.85 + const xmlChar *str2,
1.86 + int len);
1.87 +XMLPUBFUN int XMLCALL
1.88 + xmlStrEqual (const xmlChar *str1,
1.89 + const xmlChar *str2);
1.90 +XMLPUBFUN int XMLCALL
1.91 + xmlStrQEqual (const xmlChar *pref,
1.92 + const xmlChar *name,
1.93 + const xmlChar *str);
1.94 +XMLPUBFUN int XMLCALL
1.95 + xmlStrlen (const xmlChar *str);
1.96 +XMLPUBFUN xmlChar* XMLCALL
1.97 + xmlStrcat (xmlChar *cur,
1.98 + const xmlChar *add);
1.99 +XMLPUBFUN xmlChar* XMLCALL
1.100 + xmlStrncat (xmlChar *cur,
1.101 + const xmlChar *add,
1.102 + int len);
1.103 +XMLPUBFUN xmlChar* XMLCALL
1.104 + xmlStrncatNew (const xmlChar *str1,
1.105 + const xmlChar *str2,
1.106 + int len);
1.107 +XMLPUBFUN int XMLCALL
1.108 + xmlStrPrintf (xmlChar *buf,
1.109 + int len,
1.110 + const xmlChar *msg,
1.111 + ...);
1.112 +XMLPUBFUN int XMLCALL
1.113 + xmlStrVPrintf (xmlChar *buf,
1.114 + int len,
1.115 + const xmlChar *msg,
1.116 + va_list ap);
1.117 +
1.118 +XMLPUBFUN int XMLCALL
1.119 + xmlGetUTF8Char (const unsigned char *utf, int *len);
1.120 +
1.121 +#ifndef XMLENGINE_EXCLUDE_UNUSED
1.122 +XMLPUBFUN int XMLCALL xmlCheckUTF8 (const unsigned char *utf);
1.123 +#endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */
1.124 +
1.125 +XMLPUBFUN int XMLCALL
1.126 + xmlUTF8Strsize (const xmlChar *utf,
1.127 + int len);
1.128 +XMLPUBFUN xmlChar* XMLCALL
1.129 + xmlUTF8Strndup (const xmlChar *utf,
1.130 + int len);
1.131 +XMLPUBFUN xmlChar* XMLCALL
1.132 + xmlUTF8Strpos (const xmlChar *utf,
1.133 + int pos);
1.134 +XMLPUBFUN int XMLCALL
1.135 + xmlUTF8Strloc (const xmlChar *utf,
1.136 + const xmlChar *utfchar);
1.137 +XMLPUBFUN xmlChar* XMLCALL
1.138 + xmlUTF8Strsub (const xmlChar *utf,
1.139 + int start,
1.140 + int len);
1.141 +XMLPUBFUN int XMLCALL
1.142 + xmlUTF8Strlen (const xmlChar *utf);
1.143 +XMLPUBFUN int XMLCALL
1.144 + xmlUTF8Size (const xmlChar *utf);
1.145 +XMLPUBFUN int XMLCALL
1.146 + xmlUTF8Charcmp (const xmlChar *utf1,
1.147 + const xmlChar *utf2);
1.148 +
1.149 +#ifdef __cplusplus
1.150 +}
1.151 +#endif
1.152 +#endif /* XML_STRING_H */
1.153 +