Blame include/libxml/xmlstring.h

Packit 423ecb
/*
Packit 423ecb
 * Summary: set of routines to process strings
Packit 423ecb
 * Description: type and interfaces needed for the internal string handling
Packit 423ecb
 *              of the library, especially UTF8 processing.
Packit 423ecb
 *
Packit 423ecb
 * Copy: See Copyright for the status of this software.
Packit 423ecb
 *
Packit 423ecb
 * Author: Daniel Veillard
Packit 423ecb
 */
Packit 423ecb
Packit 423ecb
#ifndef __XML_STRING_H__
Packit 423ecb
#define __XML_STRING_H__
Packit 423ecb
Packit 423ecb
#include <stdarg.h>
Packit 423ecb
#include <libxml/xmlversion.h>
Packit 423ecb
Packit 423ecb
#ifdef __cplusplus
Packit 423ecb
extern "C" {
Packit 423ecb
#endif
Packit 423ecb
Packit 423ecb
/**
Packit 423ecb
 * xmlChar:
Packit 423ecb
 *
Packit 423ecb
 * This is a basic byte in an UTF-8 encoded string.
Packit 423ecb
 * It's unsigned allowing to pinpoint case where char * are assigned
Packit 423ecb
 * to xmlChar * (possibly making serialization back impossible).
Packit 423ecb
 */
Packit 423ecb
typedef unsigned char xmlChar;
Packit 423ecb
Packit 423ecb
/**
Packit 423ecb
 * BAD_CAST:
Packit 423ecb
 *
Packit 423ecb
 * Macro to cast a string to an xmlChar * when one know its safe.
Packit 423ecb
 */
Packit 423ecb
#define BAD_CAST (xmlChar *)
Packit 423ecb
Packit 423ecb
/*
Packit 423ecb
 * xmlChar handling
Packit 423ecb
 */
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlStrdup                (const xmlChar *cur);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlStrndup               (const xmlChar *cur,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlCharStrndup           (const char *cur,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlCharStrdup            (const char *cur);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlStrsub                (const xmlChar *str,
Packit 423ecb
                                         int start,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN const xmlChar * XMLCALL
Packit 423ecb
                xmlStrchr                (const xmlChar *str,
Packit 423ecb
                                         xmlChar val);
Packit 423ecb
XMLPUBFUN const xmlChar * XMLCALL
Packit 423ecb
                xmlStrstr                (const xmlChar *str,
Packit 423ecb
                                         const xmlChar *val);
Packit 423ecb
XMLPUBFUN const xmlChar * XMLCALL
Packit 423ecb
                xmlStrcasestr            (const xmlChar *str,
Packit 423ecb
                                         const xmlChar *val);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrcmp                (const xmlChar *str1,
Packit 423ecb
                                         const xmlChar *str2);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrncmp               (const xmlChar *str1,
Packit 423ecb
                                         const xmlChar *str2,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrcasecmp            (const xmlChar *str1,
Packit 423ecb
                                         const xmlChar *str2);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrncasecmp           (const xmlChar *str1,
Packit 423ecb
                                         const xmlChar *str2,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrEqual              (const xmlChar *str1,
Packit 423ecb
                                         const xmlChar *str2);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrQEqual             (const xmlChar *pref,
Packit 423ecb
                                         const xmlChar *name,
Packit 423ecb
                                         const xmlChar *str);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrlen                (const xmlChar *str);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlStrcat                (xmlChar *cur,
Packit 423ecb
                                         const xmlChar *add);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlStrncat               (xmlChar *cur,
Packit 423ecb
                                         const xmlChar *add,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
                xmlStrncatNew            (const xmlChar *str1,
Packit 423ecb
                                         const xmlChar *str2,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrPrintf             (xmlChar *buf,
Packit 423ecb
                                         int len,
Packit 423ecb
                                         const char *msg,
Packit 423ecb
                                         ...) LIBXML_ATTR_FORMAT(3,4);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
                xmlStrVPrintf                (xmlChar *buf,
Packit 423ecb
                                         int len,
Packit 423ecb
                                         const char *msg,
Packit 423ecb
                                         va_list ap) LIBXML_ATTR_FORMAT(3,0);
Packit 423ecb
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
        xmlGetUTF8Char                   (const unsigned char *utf,
Packit 423ecb
                                         int *len);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
        xmlCheckUTF8                     (const unsigned char *utf);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
        xmlUTF8Strsize                   (const xmlChar *utf,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
        xmlUTF8Strndup                   (const xmlChar *utf,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN const xmlChar * XMLCALL
Packit 423ecb
        xmlUTF8Strpos                    (const xmlChar *utf,
Packit 423ecb
                                         int pos);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
        xmlUTF8Strloc                    (const xmlChar *utf,
Packit 423ecb
                                         const xmlChar *utfchar);
Packit 423ecb
XMLPUBFUN xmlChar * XMLCALL
Packit 423ecb
        xmlUTF8Strsub                    (const xmlChar *utf,
Packit 423ecb
                                         int start,
Packit 423ecb
                                         int len);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
        xmlUTF8Strlen                    (const xmlChar *utf);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
        xmlUTF8Size                      (const xmlChar *utf);
Packit 423ecb
XMLPUBFUN int XMLCALL
Packit 423ecb
        xmlUTF8Charcmp                   (const xmlChar *utf1,
Packit 423ecb
                                         const xmlChar *utf2);
Packit 423ecb
Packit 423ecb
#ifdef __cplusplus
Packit 423ecb
}
Packit 423ecb
#endif
Packit 423ecb
#endif /* __XML_STRING_H__ */