host_strchr.c 316 B

12345678910111213141516171819
  1. /*
  2. * strchr-like wrapper around host_strchr_internal.
  3. */
  4. #include <stdbool.h>
  5. #include <string.h>
  6. #include "defs.h"
  7. #include "misc.h"
  8. #include "utils/utils.h"
  9. char *host_strchr(const char *s, int c)
  10. {
  11. char set[2];
  12. set[0] = c;
  13. set[1] = '\0';
  14. return (char *) host_strchr_internal(s, set, true);
  15. }