Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

WPXString.cpp File Reference

#include "WPXString.h"
#include "libwpd_internal.h"
#include <string>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>

Defines

#define UTF8_LENGTH(Char)
#define g_static_utf8_next_char(p)   (char *)((p) + g_static_utf8_skip_data[*((uint8_t *)p)])
#define FIRST_BUF_SIZE   128;

Functions

int g_static_utf8_strlen (const char *p)
 g_static_utf8_strlen: : pointer to the start of a UTF-8 encoded string.
int g_static_unichar_to_utf8 (uint32_t c, char *outbuf)
 g_static_unichar_to_utf8:
void appendUCS4 (WPXString &str, uint32_t ucs4)

Variables

const int8_t g_static_utf8_skip_data [256]


Define Documentation

#define FIRST_BUF_SIZE   128;
 

#define g_static_utf8_next_char  )     (char *)((p) + g_static_utf8_skip_data[*((uint8_t *)p)])
 

#define UTF8_LENGTH Char   ) 
 

Value:

((Char) < 0x80 ? 1 :                 \
   ((Char) < 0x800 ? 2 :               \
    ((Char) < 0x10000 ? 3 :            \
     ((Char) < 0x200000 ? 4 :          \
      ((Char) < 0x4000000 ? 5 : 6)))))


Function Documentation

void appendUCS4 WPXString str,
uint32_t  ucs4
 

int g_static_unichar_to_utf8 uint32_t  c,
char *  outbuf
[static]
 

g_static_unichar_to_utf8:

stolen from glib 2.4.1

: a ISO10646 character code : output buffer, must have at least 6 bytes of space. If NULL, the length will be computed and returned and nothing will be written to .

Converts a single character to UTF-8.

Return value: number of bytes written

int g_static_utf8_strlen const char *  p  )  [static]
 

g_static_utf8_strlen: : pointer to the start of a UTF-8 encoded string.

Returns the length of the string in characters.

Return value: the length of the string in characters


Variable Documentation

const int8_t g_static_utf8_skip_data[256] [static]
 

Initial value:

 {
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
  3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1
}


Generated on Tue May 3 21:36:47 2005 for libwpd by doxygen 1.3.9.1