1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; indent-offset: 4 -*- */
5 * Copyright (C) 2008 Vincent Geddes <vgeddes@gnome.org>
7 * This library is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation, either
10 * version 3 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef __ST_STRING_STREAM_H__
22 #define __ST_STRING_STREAM_H__
26 G_BEGIN_DECLS
typedef struct _GooStringStream GooStringStream
;
30 ST_STRING_STREAM_EOF
= -1,
34 GooStringStream
*st_string_stream_new (const char *string
);
37 gunichar
st_string_stream_look_ahead (GooStringStream
* stream
, int i
);
40 guint
st_string_stream_get_line (GooStringStream
* stream
);
42 guint
st_string_stream_get_column (GooStringStream
* stream
);
44 int st_string_stream_mark (GooStringStream
* stream
);
46 void st_string_stream_rewind (GooStringStream
* stream
);
48 void st_string_stream_rewind_to_marker (GooStringStream
* stream
, guint m
);
50 void st_string_stream_seek (GooStringStream
* stream
, guint index
);
52 void st_string_stream_consume (GooStringStream
* stream
);
54 void st_string_stream_reset (GooStringStream
* stream
);
56 guint
st_string_stream_size (GooStringStream
* stream
);
58 guint
st_string_stream_index (GooStringStream
* stream
);
60 char *st_string_stream_substring (GooStringStream
* stream
, guint start
, guint end
);
63 void st_string_stream_destroy (GooStringStream
* stream
);
66 #endif /* __ST_STRING_STREAM_H__ */