fix doc for eina_str

SVN revision: 46931
This commit is contained in:
Vincent Torri 2010-03-07 06:59:28 +00:00
parent 3f465fc58b
commit 993b4a6960
3 changed files with 42 additions and 13 deletions

View File

@ -20,21 +20,23 @@
#define EINA_STR_INLINE_H_
/**
* @addtogroup Eina_Str_Group Str
* @addtogroup Eina_String_Group String
*
* @{
*/
/**
* strlen() that will count up to maxlen bytes.
* @brief Count up to a given amount of bytes of the given string.
*
* If one wants to know the size of @a str, but it should not be
* greater than @a maxlen, then use this function and avoid needless
* iterations after that size.
*
* @param str the string pointer, must be valid and not @c NULL.
* @param maxlen the maximum length to allow.
* @param str The string pointer.
* @param maxlen The maximum length to allow.
* @return the string size or (size_t)-1 if greater than @a maxlen.
*
* This function returns the size of @p str, up to @p maxlen
* characters. It avoid needless iterations after that size. @p str
* must be a valid pointer and MUST not be @c NULL, otherwise this
* function will crash. This function returns the string size, or
* (size_t)-1 if the size is greater than @a maxlen.
*/
static inline size_t
eina_strlen_bounded(const char *str, size_t maxlen)

View File

@ -7,8 +7,15 @@
#include "eina_types.h"
/**
* @file eina_str.h
* @brief Contains useful C string functions.
* @addtogroup Eina_Tools_Group Tools
*
* @{
*/
/**
* @defgroup Eina_String_Group String
*
* @{
*/
/* strlcpy implementation for libc's lacking it */
@ -74,4 +81,12 @@ static inline size_t eina_strlen_bounded(const char *str, size_t maxlen) EINA_PU
#include "eina_inline_str.x"
/**
* @}
*/
/**
* @}
*/
#endif /* EINA_STR_H */

View File

@ -170,6 +170,14 @@ eina_str_split_full_helper(const char *str, const char *delim, int max_tokens, u
* API *
*============================================================================*/
/**
* @addtogroup Eina_String_Group String
*
* @brief These functions provide useful C string management.
*
* @{
*/
/**
* @brief Copy a c-string to another.
@ -392,9 +400,9 @@ eina_str_split(const char *str, const char *delim, int max_tokens)
* separate them with @p sep. The result is stored in the buffer
* @p dst and at most @p size - 1 characters will be written and the
* string is NULL-terminated. @p a_len is the length of @p a (not
* including '\0') and @p b_len is the length of @p b (not including
* '\0'). This function returns the number of characters printed (not
* including the trailing '\0' used to end output to strings). Just
* including '\\0') and @p b_len is the length of @p b (not including
* '\\0'). This function returns the number of characters printed (not
* including the trailing '\\0' used to end output to strings). Just
* like snprintf(), it will not write more than @p size bytes, thus a
* returned value of @p size or more means that the output was
* truncated.
@ -548,3 +556,7 @@ eina_str_escape(const char *str)
*d = 0;
return s2;
}
/**
* @}
*/