aboutsummaryrefslogtreecommitdiffstats
path: root/camel/gstring-util.h
blob: 10bbac3a56d31268d7e9bc011e0a51efb3ee4b86 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* gstring-util : utilities for gstring object  */

/* 
 *
 * Author : 
 *  Bertrand Guiheneuf <bertrand@helixcode.com>
 *
 * Copyright 1999, 2000 HelixCode (http://www.helixcode.com) .
 *
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License as 
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */



#ifndef GSTRING_UTIL_H
#define GSTRING_UTIL_H 1


#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus }*/

#include <glib.h>

typedef enum {
    GSTRING_DICHOTOMY_NONE            =     0,
    GSTRING_DICHOTOMY_RIGHT_DIR       =     1,
    GSTRING_DICHOTOMY_STRIP_TRAILING  =     2,
    GSTRING_DICHOTOMY_STRIP_LEADING   =     4
    
} GStringDichotomyOption;

typedef enum {
    GSTRING_TRIM_NONE            =     0,
    GSTRING_TRIM_STRIP_TRAILING  =     1,
    GSTRING_TRIM_STRIP_LEADING   =     2
} GStringTrimOption;


gboolean g_string_equals          (GString *string1, GString *string2);
GString *g_string_clone           (GString *string);
gchar    g_string_dichotomy       (GString *string, gchar sep,
                   GString **prefix, GString **suffix,
                   GStringDichotomyOption options);
void     g_string_append_g_string (GString *dest_string,
                   GString *other_string);

gboolean g_string_equal_for_hash  (gconstpointer v, gconstpointer v2);
gboolean g_string_equal_for_glist (gconstpointer v, gconstpointer v2);
guint    g_string_hash            (gconstpointer v);
void     g_string_list_free       (GList *string_list);

GList   *g_string_split           (GString *string, char sep,
                   gchar *trim_chars, GStringTrimOption trim_options);
void     g_string_trim            (GString *string, gchar *chars,
                   GStringTrimOption options);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* GSTRING_UTIL_H */
-1/+1 * Change the enable/disable button when the state changes.Not Zed2003-01-162-0/+7 * Back to using e_xml_save_file().Jeffrey Stedfast2003-01-162-3/+6 * Make dialog Cancel/OK to match HIG.Ettore Perazzoli2003-01-156-10/+29 * Call mail_config_save_accounts ().Jeffrey Stedfast2003-01-154-4/+26 * reverted fe casts and added ChageLog entriesRadek Doulik2003-01-153-3/+13 * Change the user_data argument to be of type gpointer instead ofJeffrey Stedfast2003-01-152-2/+8 * (libevolution_mail_la_SOURCES): Add mail-format.h.Ettore Perazzoli2003-01-152-0/+7 * Make the component be unversioned as a shlibRodney Dawes2003-01-152-1/+5 * Switch to using GtkPaned instead of EPaned for GTK2Rodney Dawes2003-01-152-8/+11 * EScrollFrame --> GtkScrolledWindowRadek Doulik2003-01-154-18/+13 * install the schemas fileJeffrey Stedfast2003-01-141-0/+7 * Perform some sanity checking on the auto-check-timeout value.Jeffrey Stedfast2003-01-142-1/+12 * Correctly create the clipboard buffer by using a nul to delimit the uriJeffrey Stedfast2003-01-142-2/+6 * Check the state of message_style in gconf and set the menus accordingly.Jeffrey Stedfast2003-01-144-12/+52 * Save the auto-check timeout value. (account_new_from_xml): Load theJeffrey Stedfast2003-01-142-4/+9 * include headersJeffrey Stedfast2003-01-142-6/+5 * s/BonoboXObject/BonoboObject/Dan Winship2003-01-145-21/+29 * hook onto destroy to remove dialogue from active table. (error_response):Not Zed2003-01-132-2/+11 * g_strdup the md->charset otherwise we'll get memory corruption later. ThisJeffrey Stedfast2003-01-122-1/+7 * We also need to call message_list_set_hidedeleted() here so that anyJeffrey Stedfast2003-01-116-42/+90 * notify-type is a int, not a bool. Duh.Jeffrey Stedfast2003-01-112-1/+6 * Updated for function rename.Jeffrey Stedfast2003-01-1110-53/+81 * Fixed a situation in which we could notify the shell listener twice.Jeffrey Stedfast2003-01-113-21/+26 * Save the paned_size notify handle. (folder_browser_destroy): Remove gconfNot Zed2003-01-103-3/+15 * Remove info.png from a couple of images, the image is set via code atNot Zed2003-01-102-2/+4 * enable the account before attempting to saving it.Chris Toshok2003-01-103-3/+13 * dont unref the dialogue. (dialog_destroy_cb): null out theNot Zed2003-01-102-5/+9 * pass bag to bonobo_pbclient_set_boolean.Chris Toshok2003-01-102-1/+6 * (owner_set_cb): Don't callEttore Perazzoli2003-01-102-4/+6 * #include "mail-format.h"Jeffrey Stedfast2003-01-101-0/+1 * Added druidpagestart1 to the pages list. (construct): Change the limits onNot Zed2003-01-099-188/+179 * g_free->xmlFree (account_to_xml): copy xml memory to glib memory whenNot Zed2003-01-092-16/+29 * Images are now in $(datadir)/evolution/imagesEttore Perazzoli2003-01-092-27/+32 * Call folder_browser_set_message_preview().Jeffrey Stedfast2003-01-092-2/+4 * Removed. (mail_config_set_show_preview): Removed.Jeffrey Stedfast2003-01-095-93/+48 * Save the setting via gconf. (mail_config_add_account): Immediately saveJeffrey Stedfast2003-01-093-14/+5 * Save the setting via gconf. (mail_config_add_account): Immediately saveJeffrey Stedfast2003-01-093-63/+79 * oops, forgot to init the gconf-clientJeffrey Stedfast2003-01-082-1/+4 * Use gconf to get the paned size. (folder_browser_set_message_preview):Jeffrey Stedfast2003-01-0823-1634/+1099 * Don't translate the conf strings. Camel already did it.Dan Winship2003-01-082-10/+16 * remove idldir definition. (It's defined in configure.in now)Dan Winship2003-01-062-1/+5 * Use e_destination_get_email() instead of e_destination_get_address() whenJeffrey Stedfast2003-01-052-2/+12 * Fixed some build issues.Jeffrey Stedfast2003-01-046-19/+32 * fixed to build with -DG_DISABLE_DEPRECATEDJeffrey Stedfast2003-01-038-50/+20 * newJeffrey Stedfast2003-01-031-0/+65 * ...And a whole bunch more build fixes.Jeffrey Stedfast2002-12-1824-346/+321 * Wrap the content with a table so that text isn't fully left-justified.Jeffrey Stedfast2002-12-172-7/+20 * Use camel_text_to_html() instead of e_text_to_html(). (mail_text_write):Jeffrey Stedfast2002-12-176-23/+62 * Re-implemented to use streams. Also no need to check for html sinceJeffrey Stedfast2002-12-178-791/+485 * added some #warningsJeffrey Stedfast2002-12-161-287/+305 * Make sure the folder-browser is not NULL or we'll crash.Jeffrey Stedfast2002-12-142-16/+26 * Fix the colour code to get a guint32 rgb correctly (I think - can't testJeffrey Stedfast2002-12-143-99/+102 * Don't re-use cell renderers - I'm not sure this is actually safe to do.Jeffrey Stedfast2002-12-144-46/+48 * Get rid of unneeded CamelObject casts. (user_message_response): Don'tJeffrey Stedfast2002-12-147-276/+297 * cleaned up some const'nessJeffrey Stedfast2002-12-142-150/+140 * Setup double-click here.Jeffrey Stedfast2002-12-132-5/+14 * oops, I had changed the glade code but forgot to commitJeffrey Stedfast2002-12-131-5151/+5673 * don't shadow a parameterJeffrey Stedfast2002-12-131-7/+7 * Get rid of the ETable #ifdef's - we won't ever be using ETable.Jeffrey Stedfast2002-12-132-245/+112 * cast a-warning a-way.Not Zed2002-12-125-135/+162 * New function to handle a lot of the filtering/etc that was done inJeffrey Stedfast2002-12-124-30/+57 * language is a treeview now. Not sure what to do with it yet, but get ridNot Zed2002-12-104-218/+236 * pass "Mail" to e_passwords_*. (do_get_pass): same. (main_forget_password):Chris Toshok2002-12-104-9/+21 * ignore *.serverJeffrey Stedfast2002-12-051-1/+1 * Use the same logic as mail_generate_reply(). Fixes bug #34882Jeffrey Stedfast2002-12-043-16/+63 * frobbed around with these till it exits without crashing.Not Zed2002-12-034-68/+104 * applied magic_links_settings.patchRadek Doulik2002-12-022-1/+6 * gnome_pixmap -> gtkimage. (construct): gtk_clist -> gtk_tree_view, setupNot Zed2002-12-0236-520/+374 * clicked->response signal for gtk dialogue. (new_rule_clicked): Dont unrefNot Zed2002-11-26