11 #ifndef _RTE_STRING_FNS_H_ 12 #define _RTE_STRING_FNS_H_ 23 #include <rte_compat.h> 53 char **tokens,
int maxtokens,
char delim);
61 rte_strlcpy(
char *dst,
const char *src,
size_t size)
63 return (
size_t)snprintf(dst, size,
"%s", src);
72 rte_strlcat(
char *dst,
const char *src,
size_t size)
74 size_t l = strnlen(dst, size);
76 return l + rte_strlcpy(&dst[l], src, size - l);
77 return l + strlen(src);
81 #ifdef RTE_EXEC_ENV_FREEBSD 83 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size) 84 #define strlcat(dst, src, size) rte_strlcat(dst, src, size) 89 #include <bsd/string.h> 92 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size) 93 #define strlcat(dst, src, size) rte_strlcat(dst, src, size) 118 rte_strscpy(
char *dst,
const char *src,
size_t dsize);
133 static inline const char *
static __rte_experimental const char * rte_str_skip_leading_spaces(const char *src)
int rte_strsplit(char *string, int stringlen, char **tokens, int maxtokens, char delim)
ssize_t rte_strscpy(char *dst, const char *src, size_t dsize)