[go: up one dir, main page]

File: strchrnul.c

package info (click to toggle)
andi 0.12-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,016 kB
  • sloc: ansic: 2,107; cpp: 382; sh: 196; makefile: 98; awk: 51
file content (10 lines) | stat: -rw-r--r-- 259 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
/* @brief Here follows a simple implementation of the GNU function `strchrnul`.
 * Please check the gnulib manual for details.
 */
#include <string.h>

char *strchrnul(const char *s, int c){
	char *p = strchr(s,c);

	return p != NULL ? p : strchr(s, '\0');
}