diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/eina/src/include/eina_unicode.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/libraries/eina/src/include/eina_unicode.h b/libraries/eina/src/include/eina_unicode.h index aed59af..2bbfe45 100644 --- a/libraries/eina/src/include/eina_unicode.h +++ b/libraries/eina/src/include/eina_unicode.h | |||
@@ -68,7 +68,16 @@ EAPI Eina_Unicode *eina_unicode_strdup(const Eina_Unicode *text) EINA_WARN_UNUSE | |||
68 | 68 | ||
69 | 69 | ||
70 | /** | 70 | /** |
71 | * @brief Same as strdup but cuts on n. Assumes n < len | 71 | * @brief Same as strdup but cuts on the given size. Assumes n < len |
72 | * | ||
73 | * @param text The text to duplicate. | ||
74 | * @param n The maximum size of the text to duplicate. | ||
75 | * @return The duplicated string. | ||
76 | * | ||
77 | * This function duplicates @p text. The resuting string is cut on @p | ||
78 | * n. @p n is assumed to be lesser (<) than the length of @p | ||
79 | * text. When not needed anymore, the returned string must be freed. | ||
80 | * | ||
72 | * @since 1.1.0 | 81 | * @since 1.1.0 |
73 | */ | 82 | */ |
74 | EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; | 83 | EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; |
@@ -107,9 +116,9 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL | |||
107 | 116 | ||
108 | 117 | ||
109 | /** | 118 | /** |
110 | * Reads UTF8 bytes from @buf, starting at *@index and returns | 119 | * Reads UTF8 bytes from @p buf, starting at @p iindex and returns |
111 | * the decoded code point at iindex offset, and advances iindex | 120 | * the decoded code point at @p iindex offset, and advances @p iindex |
112 | * to the next code point after this. iindex is always advanced, | 121 | * to the next code point after this. @p iindex is always advanced, |
113 | * unless if the advancement is after the NULL. | 122 | * unless if the advancement is after the NULL. |
114 | * On error: return a codepoint between DC80 to DCFF where the low 8 bits | 123 | * On error: return a codepoint between DC80 to DCFF where the low 8 bits |
115 | * are the byte's value. | 124 | * are the byte's value. |
@@ -122,9 +131,9 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL | |||
122 | EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2); | 131 | EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2); |
123 | 132 | ||
124 | /** | 133 | /** |
125 | * Reads UTF8 bytes from @buf, starting at *@iindex and returns | 134 | * Reads UTF8 bytes from @p buf, starting at @p iindex and returns |
126 | * the decoded code point at iindex offset, and moves iindex | 135 | * the decoded code point at @p iindex offset, and moves àp iindex |
127 | * to the previous code point. iindex is always moved, as long | 136 | * to the previous code point. @p iindex is always moved, as long |
128 | * as it's not past the start of the string. | 137 | * as it's not past the start of the string. |
129 | * On error: return a codepoint between DC80 to DCFF where the low 8 bits | 138 | * On error: return a codepoint between DC80 to DCFF where the low 8 bits |
130 | * are the byte's value. | 139 | * are the byte's value. |