root/replace/strchrnul.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. strchrnul

   1 #include <crm_internal.h>
   2 /* Borrowed from gnulib's strchrnul.c under GLPv2+ */
   3 
   4 #include <string.h>
   5 /* Find the first occurrence of C in S or the final NUL byte.  */
   6 char *
   7 strchrnul(const char *s, int c_in)
     /* [previous][next][first][last][top][bottom][index][help] */
   8 {
   9     char c = c_in;
  10 
  11     while (*s && (*s != c))
  12         s++;
  13 
  14     return (char *)s;
  15 }

/* [previous][next][first][last][top][bottom][index][help] */