safec  3.0
Safe C Library - ISO TR24731 Bounds Checking Interface
strpbrk_s.c File Reference
#include "safe_str_lib.h"
+ Include dependency graph for strpbrk_s.c:

Functions

EXPORT errno_t strpbrk_s (char *dest, rsize_t dmax, char *src, rsize_t slen, char **first)
 Returns a pointer, first, to the first ocurrence of any character in src which is contained in dest. More...
 

Function Documentation

◆ strpbrk_s()

EXPORT errno_t strpbrk_s ( char *  dest,
rsize_t  dmax,
char *  src,
rsize_t  slen,
char **  first 
)

Returns a pointer, first, to the first ocurrence of any character in src which is contained in dest.

Remarks
EXTENSION TO ISO/IEC TR 24731, Programming languages, environments and system software interfaces, Extensions to the C Library, Part I: Bounds-checking interfaces
Parameters
destpointer to string to compare against
dmaxrestricted maximum length of string dest
srcpointer to the string
slenrestricted length of string src
firstreturned pointer to first occurence
Precondition
Neither dest nor src shall be a null pointer.
Neither dmax nor slen shall not be 0.
Neither dmax nor slen shall not be greater than RSIZE_MAX_STR.
Returns
pointer to the first ocurrence of any character contained in src
Return values
EOKwhen successful operation
ESNULLPwhen dest/src/first is NULL pointer
ESZEROLwhen dmax/slen = 0
ESLEMAXwhen dmax/slen > RSIZE_MAX_STR
See also
strfirstchar_s(), strlastchar_s(), strfirstdiff_s(), strfirstsame_s(), strlastdiff_s(), strlastsame_s()