|
safec
3.2
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_mem_lib.h"
Include dependency graph for memrchr_s.c:Functions | |
| EXPORT errno_t | memrchr_s (const void *restrict dest, rsize_t dlen, const int ch, void **result) |
| Finds the last occurrence of ch (after conversion to char as if by (char)ch) in the null-terminated byte string pointed to by dest (each character interpreted as unsigned char). More... | |
Finds the last occurrence of ch (after conversion to char as if by (char)ch) in the null-terminated byte string pointed to by dest (each character interpreted as unsigned char).
The terminating null character is considered to be a part of the string and can be found when searching for '\0'.
| [in] | dest | pointer to string to compare against |
| [in] | dlen | restricted maximum length of dest |
| [in] | ch | character to search for |
| [out] | result | pointer to char* in dest |
| EOK | when successfully character found. |
| ESNULLP | when dest/result is a NULL pointer |
| ESZEROL | when dlen = 0 |
| ESLEMAX | when dlen > RSIZE_MAX_STR |
| ESLEMAX | when ch > 255 |
| ESNOTFND | when ch not found in dest |