diff options
Diffstat (limited to 'utils/host_strchr.c')
-rw-r--r-- | utils/host_strchr.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/utils/host_strchr.c b/utils/host_strchr.c new file mode 100644 index 00000000..363a915e --- /dev/null +++ b/utils/host_strchr.c @@ -0,0 +1,18 @@ +/* + * strchr-like wrapper around host_strchr_internal. + */ + +#include <stdbool.h> +#include <string.h> + +#include "defs.h" +#include "misc.h" +#include "utils/utils.h" + +char *host_strchr(const char *s, int c) +{ + char set[2]; + set[0] = c; + set[1] = '\0'; + return (char *) host_strchr_internal(s, set, true); +} |