diff options
author | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-01-03 18:08:55 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-01-03 18:08:55 +0800 |
commit | 01c8e48720676af9576b5eee0c3081432d61b133 (patch) | |
tree | 1e52a92515340aca8c3b8231bc2d95240329ade8 /camel/string-utils.c | |
parent | 01f62452292ef0806edd03eced94e2637c146651 (diff) | |
download | gsoc2013-evolution-01c8e48720676af9576b5eee0c3081432d61b133.tar gsoc2013-evolution-01c8e48720676af9576b5eee0c3081432d61b133.tar.gz gsoc2013-evolution-01c8e48720676af9576b5eee0c3081432d61b133.tar.bz2 gsoc2013-evolution-01c8e48720676af9576b5eee0c3081432d61b133.tar.lz gsoc2013-evolution-01c8e48720676af9576b5eee0c3081432d61b133.tar.xz gsoc2013-evolution-01c8e48720676af9576b5eee0c3081432d61b133.tar.zst gsoc2013-evolution-01c8e48720676af9576b5eee0c3081432d61b133.zip |
sync. Does not compile
svn path=/trunk/; revision=1530
Diffstat (limited to 'camel/string-utils.c')
-rw-r--r-- | camel/string-utils.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/camel/string-utils.c b/camel/string-utils.c index a8b9ed585f..beddfa8172 100644 --- a/camel/string-utils.c +++ b/camel/string-utils.c @@ -253,4 +253,23 @@ string_trim (gchar *string, const gchar *trim_chars, StringTrimOption options) +gchar * +string_prefix (const gchar *s, const gchar *suffix) +{ + guint s_len, suf_len; + guint suffix_pos; + + g_assert (s); + g_assert (suffix); + + s_len = strlen (s); + suf_len = strlen (suffix); + + if (s_len < suf_len) + return null; + suffix_pos = s_len - suf_len; + + if (!strncmp (s+suffix_pos, suffix, suf_len)) + +} |