1
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
4
* This file is part of The Croco Library
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of version 3 of the GNU General Public
8
* License as published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
* See COPYRIGHTS file for copyright information.
25
*Declaration file of the #CRString class.
28
#ifndef __CR_STRING_H__
29
#define __CR_STRING_H__
33
#include "cr-parsing-location.h"
37
typedef struct _CRString CRString ;
40
*This is a ship implementation of string based on GString.
41
*Actually, the aim of CRString is to store the parsing location
42
*(line,column,byte offset) at which a given string has been parsed
44
*So this class has a gstring field of type GString that users can
45
*freely manipulate, and also a CRParginLocation type where the
46
*parsing location is store. If you don't want to deal with parsing
47
*location stuffs, then use GString instead. If we were in C++ for example,
48
*CRString would just inherit GString and just add accessors to
49
*the CRParsingLocation data ... but we are not and we still have
50
*to provide the parsing location information.
54
*The GString where all the string
59
*The parsing location storage area.
61
CRParsingLocation location ;
64
CRString * cr_string_new (void) ;
66
CRString *cr_string_new_from_string (const gchar * a_string) ;
67
CRString * cr_string_new_from_gstring (GString *a_string) ;
68
CRString *cr_string_dup (CRString *a_this) ;
69
gchar *cr_string_dup2 (CRString *a_this) ;
70
const gchar *cr_string_peek_raw_str (CRString *a_this) ;
71
gint cr_string_peek_raw_str_len (CRString *a_this) ;
72
void cr_string_destroy (CRString *a_this) ;