diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -59,6 +59,25 @@ zenity_util_load_glade_file (const gchar *widget_root) return xml; } +gchar* +zenity_util_strip_newline (gchar *string) +{ + gsize len; + + g_return_val_if_fail (string != NULL, NULL); + + len = strlen (string); + while (len--) + { + if (string[len] == '\n') + string[len] = '\0'; + else + break; + } + + return string; +} + gboolean zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const gchar *filename) { |