|
safec
3.1
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_str_lib.h"
Include dependency graph for strlastsame_s.c:Functions | |
| EXPORT errno_t | strlastsame_s (const char *dest, rsize_t dmax, const char *src, rsize_t *idx) |
| Returns the index of the last character that is the same between dest and src. More... | |
Returns the index of the last character that is the same between dest and src.
The scanning stops at the first nul in dest or src, or after dmax characters.
| [in] | dest | pointer to string to compare against |
| [in] | dmax | restricted maximum length of string dest |
| [in] | src | pointer to the string to be compared to dest |
| [out] | idx | pointer to returned index |
| EOK | when index to last same char is returned |
| ESNULLP | when dst/src/idx is NULL pointer |
| ESZEROL | when dmax = 0 |
| ESLEMAX | when dmax > RSIZE_MAX_STR |
| ESNOTFND | when not found |