Returns a pointer to the last 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] | last | returned pointer to first occurrence of c |
- Precondition
- dest shall not be a null pointer.
-
last shall not be a null pointer.
-
dmax shall not be 0
-
dmax shall not be greater than RSIZE_MAX_STR
- Returns
- pointer to last occurence of c, NULL if not found
- Return values
-
EOK | when pointer to last occurrence is returned |
ESNULLP | when dst/first is NULL pointer |
ESZEROL | when dmax = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR |
- See also
- strfirstchar_s(), strfirstdiff_s(), strfirstsame_s(), strlastdiff_s(), strlastsame_s()