37 return s ? std::strlen(s) : 0;
43 return d && s ? std::strcpy(d, s) :
nullptr;
59 strcatdup(
const char* s1,
const char* s2,
void*(*fun)(
size_t))
61 auto d(static_cast<char*>(
62 fun((strlen(s1) + strlen(s2) + 1) *
sizeof(
char))));
char * strcpy_n(char *, const char *)
带空指针检查的字符串复制。
#define YB_UNLIKELY(expr)
分支预测提示。
char * strcpycat(char *, const char *, const char *)
带空指针检查的字符串连接。
char * strcatdup(const char *, const char *, void *(*)(size_t)=std::malloc)
带空指针检查的字符串连接复制。
size_t strlen_n(const char *)
带空指针检查的字符串长度计算。