summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorionbabalau <ionel_babalau@yahoo.com>2018-10-21 16:42:09 +0300
committerErnestas Kulik <ernestas.kulik@gmail.com>2018-10-29 15:57:26 +0000
commitd4983562d6825fa47ae81bdcabc8b0cea0e498d5 (patch)
treebec26450fda2a9e14568205dfe4b732825c8a7f8 /eel
parent5c974bd8faf6bc46048e02ecd8b5909d34f60c9b (diff)
downloadnautilus-d4983562d6825fa47ae81bdcabc8b0cea0e498d5.tar.gz
eel-string: Add description to some eel-string functions
The eel_str_double_underscores and eel_str_capitalize functions didn't have documentation. Added importance of eel_str_double_underscores as well. It's good practice to have documentation for functions in the long term.
Diffstat (limited to 'eel')
-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)
{