safec
2.1
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safeclib_private.h"
#include "safe_str_constraint.h"
#include "safe_str_lib.h"
Go to the source code of this file.
Functions | |
errno_t | strlastdiff_s (const char *dest, rsize_t dmax, const char *src, rsize_t *index) |
Returns the index of the last character that is different between dest and src. More... | |
errno_t strlastdiff_s | ( | const char * | dest, |
rsize_t | dmax, | ||
const char * | src, | ||
rsize_t * | index | ||
) |
Returns the index of the last character that is different between dest and src.
Index is valid only for EOK. The scanning stops at the first null 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] | index | pointer to returned index to last difference |
EOK | when index to last diff is returned |
ESNODIFF | when no difference |
ESNULLP | when dest/src/index is NULL pointer |
ESZEROL | when dmax = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR |
Definition at line 72 of file strlastdiff_s.c.