Lines Matching refs:strDest
20 SECUREC_INLINE errno_t SecDoCat(char *strDest, size_t destMax, const char *strSrc)
25 SECUREC_CALC_STR_LEN(strDest, destMax, &destLen);
26 /* Only optimize strSrc, do not apply this function to strDest */
30 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) {
31 strDest[0] = '\0';
32 if (strDest + destLen <= strSrc && destLen == destMax) {
39 if (srcLen + destLen >= destMax || strDest == strSrc) {
40 strDest[0] = '\0';
48 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen + 1); /* Single character length include \0 */
55 * to the end of the string pointed to by strDest.
56 * The initial character of strSrc overwrites the terminating null character of strDest.
63 * strDest Null-terminated destination string buffer.
68 * strDest is updated
72 * EINVAL strDest is NULL and destMax != 0 and destMax <= SECUREC_STRING_MAX_LEN
73 * EINVAL_AND_RESET (strDest unterminated and all other parameters are valid) or
74 * (strDest != NULL and strSrc is NULL and destMax != 0 and destMax <= SECUREC_STRING_MAX_LEN)
76 * ERANGE_AND_RESET strDest have not enough space and all other parameters are valid and not overlap
79 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
81 errno_t strcat_s(char *strDest, size_t destMax, const char *strSrc)
87 if (strDest == NULL || strSrc == NULL) {
89 if (strDest != NULL) {
90 strDest[0] = '\0';
95 return SecDoCat(strDest, destMax, strSrc);