Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/preferences/src/lib/argp/strchrnul.c @ 6393

Last change on this file since 6393 was 6393, checked in by rennerc, 18 years ago

added libargp to orxonox

File size: 441 bytes
Line 
1/* strchrnul.c
2 *
3 */
4
5/* Written by Niels Möller <nisse@lysator.liu.se>
6 *
7 * This file is hereby placed in the public domain.
8 */
9
10/* FIXME: What is this function supposed to do? My guess is that it is
11 * like strchr, but returns a pointer to the NUL character, not a NULL
12 * pointer, if the character isn't found. */
13
14char *strchrnul(const char *s, int c)
15{
16  const char *p = s;
17  while (*p && (*p != c))
18    p++;
19
20  return (char *) p;
21}
Note: See TracBrowser for help on using the repository browser.