diff options
Diffstat (limited to 'lib/ephy-string.c')
-rw-r--r-- | lib/ephy-string.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/lib/ephy-string.c b/lib/ephy-string.c index da89dd2c5..2d53c25b5 100644 --- a/lib/ephy-string.c +++ b/lib/ephy-string.c @@ -85,70 +85,3 @@ ephy_string_blank_chr (char *source) return source; } - -/* copied from egg-toolbar-editor.c */ -char * -ephy_string_elide_underscores (const char *original) -{ - char *q, *result; - const char *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; -} - -char * -ephy_string_double_underscores (const char *string) -{ - int underscores; - const char *p; - char *q; - char *escaped; - - if (string == NULL) - { - return NULL; - } - - underscores = 0; - for (p = string; *p != '\0'; p++) - { - underscores += (*p == '_'); - } - - if (underscores == 0) - { - return g_strdup (string); - } - - escaped = g_new (char, strlen (string) + underscores + 1); - for (p = string, q = escaped; *p != '\0'; p++, q++) - { - /* Add an extra underscore. */ - if (*p == '_') { - *q++ = '_'; - } - *q = *p; - } - *q = '\0'; - - return escaped; -} |