- Main Page
- Data Structures
- Files

- File List
- Globals

# jasperserver/stringbuffer.h

Go to the documentation of this file.

    00001 /*
    00002  * Copyright (C) 2007 JasperSoft http://www.jaspersoft.com
    00003  *
    00004  * This program is free software; you can redistribute it and/or modify
    00005  * it under the terms of the GNU General Public License as published by
    00006  * the Free Software Foundation; either version 2 of the License, or
    00007  * (at your option) any later version.
    00008  *
    00009  * This program is distributed WITHOUT ANY WARRANTY; and without the
    00010  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00011  * See the GNU General Public License for more details.
    00012  *
    00013  * You should have received a copy of the GNU General Public License
    00014  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
    00015  * or write to:
    00016  *
    00017  * Free Software Foundation, Inc.,
    00018  * 59 Temple Place - Suite 330,
    00019  * Boston, MA  USA  02111-1307
    00020  */
    00021 #ifndef jasperserver_stringbuffer_H
    00022 #define jasperserver_stringbuffer_H
    00023
    00024
    00025 #define INCREMENT_STRING_SIZE 256
    00026
    00034 #define JS_CSTR(c) (const char *)c->buffer->content
    00035
    00040 #define JS_UTFSTR(c) (const xmlChar *)c->buffer->content
    00041
    00046 #define JS_NOTNULL(c) (c && c->buffer->use >0)
    00047
    00048
    00049 #include <libxml/encoding.h>
    00050
    00060 typedef struct jasperserver_string
    00061 {
    00062        xmlBufferPtr buffer;
    00063 } jasperserver_string_t;
    00064
    00065
    00076 jasperserver_string_t *jasperserver_string_new();
    00077
    00084 void            jasperserver_string_free(jasperserver_string_t *jsstr);
    00085
    00092 void            jasperserver_string_append(jasperserver_string_t *jsstr,const xmlChar *str);
    00093
    00100 void            jasperserver_string_cappend(jasperserver_string_t *jsstr,const char *str);
    00101
    00108 void            jasperserver_string_set(jasperserver_string_t *jsstr,const xmlChar *str);
    00109
    00116 void            jasperserver_string_cset(jasperserver_string_t *jsstr,const char *str);
    00117
    00125 int             jasperserver_string_format(jasperserver_string_t *jsstr,const char *format, ...);
    00126 //void            jasperserver_replace_string(jasperserver_string_t *jsstr,const char *oldString, const char *newString);
    00127
    00128 #endif