[nautilus] eel-string: Add description to some eel-string functions
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] eel-string: Add description to some eel-string functions
- Date: Mon, 29 Oct 2018 16:06:56 +0000 (UTC)
commit d4983562d6825fa47ae81bdcabc8b0cea0e498d5
Author: ionbabalau <ionel_babalau yahoo com>
Date: Sun Oct 21 16:42:09 2018 +0300
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(+)
---
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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]