aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-string.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-05-28 23:43:24 +0800
committerChristian Persch <chpe@src.gnome.org>2003-05-28 23:43:24 +0800
commitbbda044fa543cce525dd4b585941ea2a6f1f249f (patch)
tree359c60a50a270a34b843b5d290724775132ce441 /lib/ephy-string.c
parent6d3a2386b12ff5505fa9a78a7130240c94df3986 (diff)
downloadgsoc2013-epiphany-bbda044fa543cce525dd4b585941ea2a6f1f249f.tar
gsoc2013-epiphany-bbda044fa543cce525dd4b585941ea2a6f1f249f.tar.gz
gsoc2013-epiphany-bbda044fa543cce525dd4b585941ea2a6f1f249f.tar.bz2
gsoc2013-epiphany-bbda044fa543cce525dd4b585941ea2a6f1f249f.tar.lz
gsoc2013-epiphany-bbda044fa543cce525dd4b585941ea2a6f1f249f.tar.xz
gsoc2013-epiphany-bbda044fa543cce525dd4b585941ea2a6f1f249f.tar.zst
gsoc2013-epiphany-bbda044fa543cce525dd4b585941ea2a6f1f249f.zip
continuing checkin of previous patch (cvs aborted "broken pipe")
2003-05-28 Christian Persch <chpe@cvs.gnome.org> continuing checkin of previous patch (cvs aborted "broken pipe")
Diffstat (limited to 'lib/ephy-string.c')
-rw-r--r--lib/ephy-string.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/lib/ephy-string.c b/lib/ephy-string.c
index 46a6b6d9f..b97e0485c 100644
--- a/lib/ephy-string.c
+++ b/lib/ephy-string.c
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -499,3 +499,32 @@ ephy_str_replace_substring (const char *string,
return result;
}
+
+/* copied from egg-toolbar-editor.c */
+gchar *
+ephy_str_elide_underscores (const gchar *original)
+{
+ gchar *q, *result;
+ const gchar *p;
+ gboolean last_underscore;
+
+ q = result = g_malloc (strlen (original) + 1);
+ last_underscore = FALSE;
+
+ for (p = original; *p; p++)
+ {
+ if (!last_underscore && *p == '_')
+ {
+ last_underscore = TRUE;
+ }
+ else
+ {
+ last_underscore = FALSE;
+ *q++ = *p;
+ }
+ }
+
+ *q = '\0';
+
+ return result;
+}