40 #ifndef _RTE_STRING_FNS_H_
41 #define _RTE_STRING_FNS_H_
78 char **tokens,
int maxtokens,
char delim);
86 rte_strlcpy(
char *dst,
const char *src,
size_t size)
88 return (
size_t)snprintf(dst, size,
"%s", src);
97 rte_strlcat(
char *dst,
const char *src,
size_t size)
99 size_t l = strnlen(dst, size);
101 return l + rte_strlcpy(&dst[l], src, size - l);
102 return l + strlen(src);
106 #ifdef RTE_EXEC_ENV_BSDAPP
107 #ifndef __BSD_VISIBLE
108 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
109 #define strlcat(dst, src, size) rte_strlcat(dst, src, size)
113 #ifdef RTE_USE_LIBBSD
114 #include <bsd/string.h>
117 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
118 #define strlcat(dst, src, size) rte_strlcat(dst, src, size)
int rte_strsplit(char *string, int stringlen, char **tokens, int maxtokens, char delim)