epoc32/include/stdapis/libxml2/libxml2_xmlstring.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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.
     5  *
     6  * Copy: See Copyright for the status of this software.
     7  *
     8  * Author: Daniel Veillard
     9  * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
    10  */
    11 
    12 /** @file
    13 @publishedAll
    14 @released
    15 */
    16 
    17 #ifndef XML_STRING_H
    18 #define XML_STRING_H
    19 
    20 #include <stdarg.h>
    21 #include <stdapis/libxml2/libxml2_xmlversion.h>
    22 
    23 #ifdef __cplusplus
    24 extern "C" {
    25 #endif
    26 
    27 /**
    28  * xmlChar:
    29  *
    30  * This is a basic byte in an UTF-8 encoded string.
    31  * It's unsigned allowing to pinpoint case where char * are assigned
    32  * to xmlChar * (possibly making serialization back impossible).
    33  */
    34 
    35 typedef unsigned char xmlChar;
    36 
    37 /**
    38  * BAD_CAST:
    39  *
    40  * Macro to cast a string to an xmlChar * when one know its safe.
    41  */
    42 #define BAD_CAST (xmlChar *)
    43 
    44 /*
    45  * xmlChar handling
    46  */
    47 XMLPUBFUN xmlChar* XMLCALL
    48                 xmlStrdup                (const xmlChar *cur);
    49 XMLPUBFUN xmlChar* XMLCALL
    50                 xmlStrndup               (const xmlChar *cur,
    51                                          int len);
    52 XMLPUBFUN xmlChar* XMLCALL
    53                 xmlCharStrndup           (const char *cur,
    54                                          int len);
    55 XMLPUBFUN xmlChar* XMLCALL
    56                 xmlCharStrdup            (const char *cur);
    57 XMLPUBFUN xmlChar* XMLCALL
    58                 xmlStrsub                (const xmlChar *str,
    59                                          int start,
    60                                          int len);
    61 XMLPUBFUN const xmlChar* XMLCALL
    62                 xmlStrchr                (const xmlChar *str,
    63                                          xmlChar val);
    64 XMLPUBFUN const xmlChar* XMLCALL
    65                 xmlStrstr                (const xmlChar *str,
    66                                          const xmlChar *val);
    67 XMLPUBFUN const xmlChar* XMLCALL
    68                 xmlStrcasestr            (const xmlChar *str,
    69                                          xmlChar *val);
    70 XMLPUBFUN int XMLCALL
    71                 xmlStrcmp                (const xmlChar *str1,
    72                                          const xmlChar *str2);
    73 XMLPUBFUN int XMLCALL
    74                 xmlStrncmp               (const xmlChar *str1,
    75                                          const xmlChar *str2,
    76                                          int len);
    77 XMLPUBFUN int XMLCALL
    78                 xmlStrcasecmp            (const xmlChar *str1,
    79                                          const xmlChar *str2);
    80 XMLPUBFUN int XMLCALL
    81                 xmlStrncasecmp           (const xmlChar *str1,
    82                                          const xmlChar *str2,
    83                                          int len);
    84 XMLPUBFUN int XMLCALL
    85                 xmlStrEqual              (const xmlChar *str1,
    86                                          const xmlChar *str2);
    87 XMLPUBFUN int XMLCALL
    88                 xmlStrQEqual             (const xmlChar *pref,
    89                                          const xmlChar *name,
    90                                          const xmlChar *str);
    91 XMLPUBFUN int XMLCALL
    92                 xmlStrlen                (const xmlChar *str);
    93 XMLPUBFUN xmlChar* XMLCALL
    94                 xmlStrcat                (xmlChar *cur,
    95                                          const xmlChar *add);
    96 XMLPUBFUN xmlChar* XMLCALL
    97                 xmlStrncat               (xmlChar *cur,
    98                                          const xmlChar *add,
    99                                          int len);
   100 XMLPUBFUN xmlChar* XMLCALL
   101                 xmlStrncatNew            (const xmlChar *str1,
   102                                          const xmlChar *str2,
   103                                          int len);
   104 XMLPUBFUN int XMLCALL
   105                 xmlStrPrintf             (xmlChar *buf,
   106                                          int len,
   107                                          const xmlChar *msg,
   108                                          ...);
   109 XMLPUBFUN int XMLCALL
   110                 xmlStrVPrintf                (xmlChar *buf,
   111                                          int len,
   112                                          const xmlChar *msg,
   113                                          va_list ap);
   114 
   115 XMLPUBFUN int XMLCALL
   116         xmlGetUTF8Char                   (const unsigned char *utf,  int *len);
   117 
   118 #ifndef XMLENGINE_EXCLUDE_UNUSED
   119 XMLPUBFUN int XMLCALL xmlCheckUTF8 (const unsigned char *utf);
   120 #endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */
   121 
   122 XMLPUBFUN int XMLCALL
   123         xmlUTF8Strsize                   (const xmlChar *utf,
   124                                          int len);
   125 XMLPUBFUN xmlChar* XMLCALL
   126         xmlUTF8Strndup                   (const xmlChar *utf,
   127                                          int len);
   128 XMLPUBFUN xmlChar* XMLCALL
   129         xmlUTF8Strpos                    (const xmlChar *utf,
   130                                          int pos);
   131 XMLPUBFUN int XMLCALL
   132         xmlUTF8Strloc                    (const xmlChar *utf,
   133                                          const xmlChar *utfchar);
   134 XMLPUBFUN xmlChar* XMLCALL
   135         xmlUTF8Strsub                    (const xmlChar *utf,
   136                                          int start,
   137                                          int len);
   138 XMLPUBFUN int XMLCALL
   139         xmlUTF8Strlen                    (const xmlChar *utf);
   140 XMLPUBFUN int XMLCALL
   141         xmlUTF8Size                      (const xmlChar *utf);
   142 XMLPUBFUN int XMLCALL
   143         xmlUTF8Charcmp                   (const xmlChar *utf1,
   144                                          const xmlChar *utf2);
   145 
   146 #ifdef __cplusplus
   147 }
   148 #endif
   149 #endif /* XML_STRING_H */
   150