1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* gstring-util : utilities for gstring object */
6 * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #ifndef GSTRING_UTIL_H
27 #define GSTRING_UTIL_H 1
33 #endif /* __cplusplus }*/
39 DICHOTOMY_RIGHT_DIR = 1,
40 DICHOTOMY_STRIP_TRAILING = 2,
41 DICHOTOMY_STRIP_LEADING = 4,
47 TRIM_STRIP_TRAILING = 1,
48 TRIM_STRIP_LEADING = 2,
53 gboolean g_string_equals(GString *string1, GString *string2);
54 GString *g_string_clone(GString *string);
55 gchar g_string_dichotomy( GString *string, gchar sep, GString **prefix, GString **suffix, DichotomyOption options);
56 void g_string_append_g_string(GString *dest_string, GString *other_string);
58 gboolean g_string_equal_for_hash (gconstpointer v, gconstpointer v2);
59 gboolean g_string_equal_for_glist (gconstpointer v, gconstpointer v2);
60 guint g_string_hash (gconstpointer v);
61 void g_string_list_free (GList *string_list);
63 GList *g_string_split (GString *string, char sep, gchar *trim_chars, TrimOption trim_options);
64 void g_string_trim (GString *string, gchar *chars, TrimOption options);
68 #endif /* __cplusplus */
70 #endif /* GSTRING_UTIL_H */