Eneboo - Documentación para desarrolladores
'defines' | 'typedefs' | Funciones
Referencia del Archivo src/libdigidoc/libxml2/include/libxml/xmlstring.h
#include <stdarg.h>
#include <libxml/xmlversion.h>

Ir al código fuente de este archivo.

'defines'

#define BAD_CAST   (xmlChar *)

'typedefs'

typedef unsigned char xmlChar

Funciones

XMLPUBFUN xmlChar *XMLCALL xmlStrdup (const xmlChar *cur)
XMLPUBFUN xmlChar *XMLCALL xmlStrndup (const xmlChar *cur, int len)
XMLPUBFUN xmlChar *XMLCALL xmlCharStrndup (const char *cur, int len)
XMLPUBFUN xmlChar *XMLCALL xmlCharStrdup (const char *cur)
XMLPUBFUN xmlChar *XMLCALL xmlStrsub (const xmlChar *str, int start, int len)
XMLPUBFUN const xmlChar *XMLCALL xmlStrchr (const xmlChar *str, xmlChar val)
XMLPUBFUN const xmlChar *XMLCALL xmlStrstr (const xmlChar *str, const xmlChar *val)
XMLPUBFUN const xmlChar *XMLCALL xmlStrcasestr (const xmlChar *str, const xmlChar *val)
XMLPUBFUN int XMLCALL xmlStrcmp (const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrncmp (const xmlChar *str1, const xmlChar *str2, int len)
XMLPUBFUN int XMLCALL xmlStrcasecmp (const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrncasecmp (const xmlChar *str1, const xmlChar *str2, int len)
XMLPUBFUN int XMLCALL xmlStrEqual (const xmlChar *str1, const xmlChar *str2)
XMLPUBFUN int XMLCALL xmlStrQEqual (const xmlChar *pref, const xmlChar *name, const xmlChar *str)
XMLPUBFUN int XMLCALL xmlStrlen (const xmlChar *str)
XMLPUBFUN xmlChar *XMLCALL xmlStrcat (xmlChar *cur, const xmlChar *add)
XMLPUBFUN xmlChar *XMLCALL xmlStrncat (xmlChar *cur, const xmlChar *add, int len)
XMLPUBFUN xmlChar *XMLCALL xmlStrncatNew (const xmlChar *str1, const xmlChar *str2, int len)
XMLPUBFUN int XMLCALL xmlStrPrintf (xmlChar *buf, int len, const xmlChar *msg,...)
XMLPUBFUN int XMLCALL xmlStrVPrintf (xmlChar *buf, int len, const xmlChar *msg, va_list ap)
XMLPUBFUN int XMLCALL xmlGetUTF8Char (const unsigned char *utf, int *len)
XMLPUBFUN int XMLCALL xmlCheckUTF8 (const unsigned char *utf)
XMLPUBFUN int XMLCALL xmlUTF8Strsize (const xmlChar *utf, int len)
XMLPUBFUN xmlChar *XMLCALL xmlUTF8Strndup (const xmlChar *utf, int len)
XMLPUBFUN const xmlChar *XMLCALL xmlUTF8Strpos (const xmlChar *utf, int pos)
XMLPUBFUN int XMLCALL xmlUTF8Strloc (const xmlChar *utf, const xmlChar *utfchar)
XMLPUBFUN xmlChar *XMLCALL xmlUTF8Strsub (const xmlChar *utf, int start, int len)
XMLPUBFUN int XMLCALL xmlUTF8Strlen (const xmlChar *utf)
XMLPUBFUN int XMLCALL xmlUTF8Size (const xmlChar *utf)
XMLPUBFUN int XMLCALL xmlUTF8Charcmp (const xmlChar *utf1, const xmlChar *utf2)

Documentación de los 'defines'

#define BAD_CAST   (xmlChar *)

BAD_CAST:

Macro to cast a string to an xmlChar * when one know its safe.


Documentación de los 'typedefs'

typedef unsigned char xmlChar

xmlChar:

This is a basic byte in an UTF-8 encoded string. It's unsigned allowing to pinpoint case where char * are assigned to xmlChar * (possibly making serialization back impossible).


Documentación de las funciones

XMLPUBFUN xmlChar* XMLCALL xmlCharStrdup ( const char *  cur)

xmlCharStrdup: : the input char *

a strdup for char's to xmlChar's

Returns a new xmlChar * or NULL

XMLPUBFUN xmlChar* XMLCALL xmlCharStrndup ( const char *  cur,
int  len 
)

xmlCharStrndup: : the input char * : the len of

a strndup for char's to xmlChar's

Returns a new xmlChar * or NULL

XMLPUBFUN int XMLCALL xmlCheckUTF8 ( const unsigned char *  utf)

xmlCheckUTF8: : Pointer to putative UTF-8 encoded string.

Checks for being valid UTF-8. is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value.

Return value: true if is valid.

XMLPUBFUN int XMLCALL xmlGetUTF8Char ( const unsigned char *  utf,
int len 
)

xmlGetUTF8Char: : a sequence of UTF-8 encoded bytes : a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.

Read the first UTF8 character from

Returns the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)

XMLPUBFUN int XMLCALL xmlStrcasecmp ( const xmlChar str1,
const xmlChar str2 
)

xmlStrcasecmp: : the first xmlChar * : the second xmlChar *

a strcasecmp for xmlChar's

Returns the integer result of the comparison

XMLPUBFUN const xmlChar* XMLCALL xmlStrcasestr ( const xmlChar str,
const xmlChar val 
)

xmlStrcasestr: : the xmlChar * array (haystack) : the xmlChar to search (needle)

a case-ignoring strstr for xmlChar's

Returns the xmlChar * for the first occurrence or NULL.

XMLPUBFUN xmlChar* XMLCALL xmlStrcat ( xmlChar cur,
const xmlChar add 
)

xmlStrcat: : the original xmlChar * array : the xmlChar * array added

a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

Returns a new xmlChar * containing the concatenated string.

XMLPUBFUN const xmlChar* XMLCALL xmlStrchr ( const xmlChar str,
xmlChar  val 
)

xmlStrchr: : the xmlChar * array : the xmlChar to search

a strchr for xmlChar's

Returns the xmlChar * for the first occurrence or NULL.

XMLPUBFUN int XMLCALL xmlStrcmp ( const xmlChar str1,
const xmlChar str2 
)

xmlStrcmp: : the first xmlChar * : the second xmlChar *

a strcmp for xmlChar's

Returns the integer result of the comparison

XMLPUBFUN xmlChar* XMLCALL xmlStrdup ( const xmlChar cur)

xmlStrdup: : the input xmlChar *

a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.

Returns a new xmlChar * or NULL

XMLPUBFUN int XMLCALL xmlStrEqual ( const xmlChar str1,
const xmlChar str2 
)

xmlStrEqual: : the first xmlChar * : the second xmlChar *

Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()

Returns 1 if they are equal, 0 if they are different

XMLPUBFUN int XMLCALL xmlStrlen ( const xmlChar str)

xmlStrlen: : the xmlChar * array

length of a xmlChar's string

Returns the number of xmlChar contained in the ARRAY.

XMLPUBFUN int XMLCALL xmlStrncasecmp ( const xmlChar str1,
const xmlChar str2,
int  len 
)

xmlStrncasecmp: : the first xmlChar * : the second xmlChar * : the max comparison length

a strncasecmp for xmlChar's

Returns the integer result of the comparison

XMLPUBFUN xmlChar* XMLCALL xmlStrncat ( xmlChar cur,
const xmlChar add,
int  len 
)

xmlStrncat: : the original xmlChar * array : the xmlChar * array added : the length of

a strncat for array of xmlChar's, it will extend with the len first bytes of . Note that if < 0 then this is an API error and NULL will be returned.

Returns a new xmlChar *, the original is reallocated if needed and should not be freed

XMLPUBFUN xmlChar* XMLCALL xmlStrncatNew ( const xmlChar str1,
const xmlChar str2,
int  len 
)

xmlStrncatNew: : first xmlChar string : second xmlChar string : the len of or < 0

same as xmlStrncat, but creates a new string. The original two strings are not freed. If is < 0 then the length will be calculated automatically.

Returns a new xmlChar * or NULL

XMLPUBFUN int XMLCALL xmlStrncmp ( const xmlChar str1,
const xmlChar str2,
int  len 
)

xmlStrncmp: : the first xmlChar * : the second xmlChar * : the max comparison length

a strncmp for xmlChar's

Returns the integer result of the comparison

XMLPUBFUN xmlChar* XMLCALL xmlStrndup ( const xmlChar cur,
int  len 
)

xmlStrndup: : the input xmlChar * : the len of

a strndup for array of xmlChar's

Returns a new xmlChar * or NULL

XMLPUBFUN int XMLCALL xmlStrPrintf ( xmlChar buf,
int  len,
const xmlChar msg,
  ... 
)

xmlStrPrintf: : the result buffer. : the result buffer length. : the message with printf formatting. @...: extra parameters for the message.

Formats and places result into .

Returns the number of characters written to or -1 if an error occurs.

XMLPUBFUN int XMLCALL xmlStrQEqual ( const xmlChar pref,
const xmlChar name,
const xmlChar str 
)
XMLPUBFUN const xmlChar* XMLCALL xmlStrstr ( const xmlChar str,
const xmlChar val 
)

xmlStrstr: : the xmlChar * array (haystack) : the xmlChar to search (needle)

a strstr for xmlChar's

Returns the xmlChar * for the first occurrence or NULL.

XMLPUBFUN xmlChar* XMLCALL xmlStrsub ( const xmlChar str,
int  start,
int  len 
)

xmlStrsub: : the xmlChar * array (haystack) : the index of the first char (zero based) : the length of the substring

Extract a substring of a given string

Returns the xmlChar * for the first occurrence or NULL.

XMLPUBFUN int XMLCALL xmlStrVPrintf ( xmlChar buf,
int  len,
const xmlChar msg,
va_list  ap 
)

xmlStrVPrintf: : the result buffer. : the result buffer length. : the message with printf formatting. : extra parameters for the message.

Formats and places result into .

Returns the number of characters written to or -1 if an error occurs.

XMLPUBFUN int XMLCALL xmlUTF8Charcmp ( const xmlChar utf1,
const xmlChar utf2 
)

xmlUTF8Charcmp: : pointer to first UTF8 char : pointer to second UTF8 char

compares the two UCS4 values

returns result of the compare as with xmlStrncmp

XMLPUBFUN int XMLCALL xmlUTF8Size ( const xmlChar utf)

xmlUTF8Size: : pointer to the UTF8 character

calculates the internal size of a UTF8 character

returns the numbers of bytes in the character, -1 on format error

XMLPUBFUN int XMLCALL xmlUTF8Strlen ( const xmlChar utf)

xmlUTF8Strlen: : a sequence of UTF-8 encoded bytes

compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.

Returns the number of characters in the string or -1 in case of error

XMLPUBFUN int XMLCALL xmlUTF8Strloc ( const xmlChar utf,
const xmlChar utfchar 
)

xmlUTF8Strloc: : the input UTF8 * : the UTF8 character to be found

a function to provide the relative location of a UTF8 char

Returns the relative character position of the desired char or -1 if not found

XMLPUBFUN xmlChar* XMLCALL xmlUTF8Strndup ( const xmlChar utf,
int  len 
)

xmlUTF8Strndup: : the input UTF8 * : the len of (in chars)

a strndup for array of UTF8's

Returns a new UTF8 * or NULL

XMLPUBFUN const xmlChar* XMLCALL xmlUTF8Strpos ( const xmlChar utf,
int  pos 
)

xmlUTF8Strpos: : the input UTF8 * : the position of the desired UTF8 char (in chars)

a function to provide the equivalent of fetching a character from a string array

Returns a pointer to the UTF8 character or NULL

XMLPUBFUN int XMLCALL xmlUTF8Strsize ( const xmlChar utf,
int  len 
)

xmlUTF8Strsize: : a sequence of UTF-8 encoded bytes : the number of characters in the array

storage size of an UTF8 string the behaviour is not garanteed if the input string is not UTF-8

Returns the storage size of the first 'len' characters of ARRAY

XMLPUBFUN xmlChar* XMLCALL xmlUTF8Strsub ( const xmlChar utf,
int  start,
int  len 
)

xmlUTF8Strsub: : a sequence of UTF-8 encoded bytes : relative pos of first char : total number to copy

Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars

Returns a pointer to a newly created string or NULL if any problem

 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'