summaryrefslogtreecommitdiff
path: root/eel/eel-string.c
diff options
context:
space:
mode:
Diffstat (limited to 'eel/eel-string.c')
-rw-r--r--eel/eel-string.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/eel/eel-string.c b/eel/eel-string.c
index 1fa480c24..077c1c379 100644
--- a/eel/eel-string.c
+++ b/eel/eel-string.c
@@ -33,6 +33,18 @@
#include "eel-lib-self-check-functions.h"
#endif
+/**
+ * eel_str_double_underscores:
+ * @string: input string
+ *
+ * This is used if you want to preserve underscore characters
+ * when creating a label with gtk_label_new_with_mnemonic().
+ *
+ * Returns: a newly allocated copy of @string,
+ * with a doubled number of underscores.
+ * If @string doesn't contain underscores, returns a copy of it.
+ * If @string is %NULL, returns %NULL.
+ */
char *
eel_str_double_underscores (const char *string)
{
@@ -72,6 +84,14 @@ eel_str_double_underscores (const char *string)
return escaped;
}
+/**
+ * eel_str_capitalize:
+ * @string: input string
+ *
+ * Returns: a newly allocated copy of @string,
+ * with the first letter capitalized.
+ * If @string is %NULL, returns %NULL.
+ */
char *
eel_str_capitalize (const char *string)
{