This function returns a pointer to the first occurrence of character c in dest.
The scanning stops at the first null or after dmax characters.
- Parameters
-
[in] | dest | pointer to string to compare against |
[in] | dmax | restricted maximum length of string |
[in] | c | character to locate |
[out] | first | returned pointer to first occurrence of c |
- Precondition
- dest shall not be a null pointer.
-
first shall not be a null pointer.
-
dmax shall not be 0
-
dmax shall not be greater than RSIZE_MAX_STR
- Returns
- pointer to first occurence of c, NULL if not found
- Return values
-
EOK | when pointer to first occurrence is returned |
ESNULLP | when dst/first is NULL pointer |
ESZEROL | when dmax = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR |
- See also
- strlastchar_s(), strfirstdiff_s(), strfirstsame_s(), strlastdiff_s(), strlastsame_s(),