blob: 2dc2e1cdc25e3591504141f1b19f46f40f5dd2ff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include "TabString.h"
/*
* Like strchr, except has a length limit.
*/
char *
strnchr(s, c, n)
char *s;
int c;
int n;
{
while (n--)
if (*s == c) return s; else ++s;
return NULL;
}
|