Resolves to strnLen_s, to wcsnLen_s or to ucpsnLen_s depending on the template parameter.
- Template Parameters
-
CHAR_TYPE | is a type of a string character. |
- Parameters
-
[in] | pszStr | is a pointer to a string of the returned length. The parameter may be NULL, the function returns 0 in this case. |
[in] | cchStr | is a size, in characters, of the buffer where the string is located. It is treated as a maximum length of the string. Thus, the returned value is less or equal to cchStr. The parameter is ignored if pszStr is NULL. |
- Returns
- If the pszStr pointer is NULL, the function returns 0. Otherwise the function returns a length, in characters, of the string pointed to by pszStr. If the cchStr characters constitute a zero-terminated string the function behaves identically to tcsLen, returning a number of characters before the null terminator. Otherwise the function returns cchStr.