From d4983562d6825fa47ae81bdcabc8b0cea0e498d5 Mon Sep 17 00:00:00 2001 From: ionbabalau Date: Sun, 21 Oct 2018 16:42:09 +0300 Subject: 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. --- eel/eel-string.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'eel') 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) { -- cgit v1.2.1