safec
3.2
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_str_lib.h"
Functions | |
EXPORT errno_t | strchr_s (const char *restrict dest, rsize_t dmax, const int ch, char **result) |
Finds the first 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 first 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] | dmax | 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 dmax = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR |
ESLEMAX | when ch > 255 |
ESNOTFND | when ch not found in dest |