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 }*/
38 GSTRING_DICHOTOMY_NONE = 0,
39 GSTRING_DICHOTOMY_RIGHT_DIR = 1,
40 GSTRING_DICHOTOMY_STRIP_TRAILING = 2,
41 GSTRING_DICHOTOMY_STRIP_LEADING = 4,
43 } GStringDichotomyOption;
46 GSTRING_TRIM_NONE = 0,
47 GSTRING_TRIM_STRIP_TRAILING = 1,
48 GSTRING_TRIM_STRIP_LEADING = 2,
52 gboolean g_string_equals (GString *string1, GString *string2);
53 GString *g_string_clone (GString *string);
54 gchar g_string_dichotomy (GString *string, gchar sep,
55 GString **prefix, GString **suffix,
56 GStringDichotomyOption options);
57 void g_string_append_g_string (GString *dest_string,
58 GString *other_string);
60 gboolean g_string_equal_for_hash (gconstpointer v, gconstpointer v2);
61 gboolean g_string_equal_for_glist (gconstpointer v, gconstpointer v2);
62 guint g_string_hash (gconstpointer v);
63 void g_string_list_free (GList *string_list);
65 GList *g_string_split (GString *string, char sep,
66 gchar *trim_chars, GStringTrimOption trim_options);
67 void g_string_trim (GString *string, gchar *chars,
68 GStringTrimOption options);
72 #endif /* __cplusplus */
74 #endif /* GSTRING_UTIL_H */