diff options
Diffstat (limited to 'eel')
-rw-r--r-- | eel/eel-string.c | 36 | ||||
-rw-r--r-- | eel/eel-string.h | 8 |
2 files changed, 0 insertions, 44 deletions
diff --git a/eel/eel-string.c b/eel/eel-string.c index 85c0841a4..0a41a0bf9 100644 --- a/eel/eel-string.c +++ b/eel/eel-string.c @@ -224,42 +224,6 @@ eel_str_replace_substring (const char *string, return result; } -char * -eel_str_rtrim_punctuation (char *str) -{ - int num_punctuation_chars; - int str_len; - int num_chars_left; - char *current_char_pos; - gunichar current_char; - - num_punctuation_chars = 0; - str_len = g_utf8_strlen (str, -1); - current_char_pos = g_utf8_offset_to_pointer (str, str_len); - - while (num_punctuation_chars <= str_len) - { - current_char_pos = g_utf8_prev_char (current_char_pos); - current_char = g_utf8_get_char (current_char_pos); - - if (!g_unichar_ispunct (current_char) && !g_unichar_isspace (current_char)) - { - break; - } - - ++num_punctuation_chars; - } - - if (num_punctuation_chars == 0) - { - return g_strdup (str); - } - - num_chars_left = str_len - num_punctuation_chars; - - return g_utf8_substring (str, 0, num_chars_left); -} - /** * get_common_prefix_length: * @str_a: first string diff --git a/eel/eel-string.h b/eel/eel-string.h index 98cca7e9f..5df4b6b2a 100644 --- a/eel/eel-string.h +++ b/eel/eel-string.h @@ -57,14 +57,6 @@ char * eel_str_strip_substring_and_after (const char *str, char * eel_str_replace_substring (const char *str, const char *substring, const char *replacement); -/** - * eel_str_rtrim_punctuation: - * @str: string - * - * Returns: a copy of str with trailing punctuation characters removed - */ -char * eel_str_rtrim_punctuation (char *str); - /** * eel_str_get_common_prefix: |