Lines Matching defs:str
64 size_t BUF_strnlen(const char *str, size_t maxlen)
68 for (p = str; maxlen-- != 0 && *p != '\0'; ++p) ;
70 return p - str;
73 char *BUF_strdup(const char *str)
75 if (str == NULL)
77 return BUF_strndup(str, strlen(str));
80 char *BUF_strndup(const char *str, size_t siz)
84 if (str == NULL)
87 siz = BUF_strnlen(str, siz);
98 memcpy(ret, str, siz);