Add inv_strpbrk() function and convert equivalent sindex() calls

inv_strpbrk() is the inverse of the standard function strpbrk().

Calls to sindex() where both strings are not NULL and the second string begins with ^ are equivalent
to calls to inv_strpbrk() (but without the ^).  Convert those calls.
This commit is contained in:
Kevin Easton
2017-11-17 17:19:07 +11:00
parent 8c7d9334dd
commit 0d5698d41b
3 changed files with 26 additions and 17 deletions

View File

@@ -28,6 +28,7 @@ char * BX_last_arg (char **);
char * BX_expand_twiddle (char *);
char * BX_upper (char *);
char * BX_lower (char *);
char *inv_strpbrk(const char *s, const char *reject);
char * BX_sindex (const char *, const char *);
char * BX_rsindex (const char *, const char *, const char *, int);
char * BX_path_search (char *, char *);