The strcasestr_s() function locates the first occurrence of the substring pointed to by src which would be located in the string pointed to by dest.
The comparison is case insensitive.
- Parameters
-
[in] | dest | pointer to string to be searched for the substring |
[in] | dmax | restricted maximum length of dest string |
[in] | src | pointer to the sub string |
[in] | slen | maximum length of src string |
[out] | substring | returned pointer to the substring |
- Precondition
- Neither dest nor src shall be a null pointer.
-
Neither dmax nor slen shall equal zero.
-
Neither dmax nor slen shall be greater than RSIZE_MAX_STR.
- Return values
-
EOK | when successful operation, substring found. |
ESNULLP | when dst/src/substring is NULL pointer |
ESZEROL | when dmax/slen = 0 |
ESLEMAX | when dmax/slen > RSIZE_MAX_STR |
ESNOTFND | when substring not found |
- See also
- strstr_s(), strprefix_s()