Lines Matching refs:strDest
20 SECUREC_INLINE errno_t SecDoCatLimitW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count)
25 SECUREC_CALC_WSTR_LEN(strDest, destMax, &destLen);
28 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) {
29 strDest[0] = L'\0';
30 if (strDest + destLen <= strSrc && destLen == destMax) {
37 if (srcLen + destLen >= destMax || strDest == strSrc) {
38 strDest[0] = L'\0';
46 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen * sizeof(wchar_t)); /* no terminator */
47 *(strDest + destLen + srcLen) = L'\0';
55 * from the array pointed to by strSrc to the end of the wide string pointed to by strDest.
58 * the end of strDest, where D is the lesser of count and the length of strSrc.
59 * If appending those D characters will fit within strDest (whose size is
62 * strDest, and a new terminating null is appended; otherwise, strDest[0] is
66 * strDest Null-terminated destination string.
72 * strDest is updated
76 * EINVAL strDest is NULL and destMax != 0 and destMax <= SECUREC_WCHAR_STRING_MAX_LEN
77 * EINVAL_AND_RESET (strDest unterminated and all other parameters are valid) or
78 * (strDest != NULL and strSrc is NULL and destMax != 0 and
81 * ERANGE_AND_RESET strDest have not enough space and all other parameters are valid and not overlap
84 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
86 errno_t wcsncat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count)
92 if (strDest == NULL || strSrc == NULL) {
94 if (strDest != NULL) {
95 strDest[0] = L'\0';
104 return SecDoCatLimitW(strDest, destMax, strSrc, destMax);
107 strDest[0] = L'\0';
111 return SecDoCatLimitW(strDest, destMax, strSrc, count);