11 #ifndef _RTE_STRING_FNS_H_ 12 #define _RTE_STRING_FNS_H_ 19 #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);
85 #ifdef RTE_EXEC_ENV_FREEBSD 87 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size) 88 #define strlcat(dst, src, size) rte_strlcat(dst, src, size) 93 #include <bsd/string.h> 96 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size) 97 #define strlcat(dst, src, size) rte_strlcat(dst, src, size) 126 rte_strscpy(
char *dst,
const char *src,
size_t dsize);
141 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)