projects
/
mmh
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Changed my mind again on scan.MMDDYY and scan.YYYYMMDD. Put the replied /
[mmh]
/
sbr
/
strindex.c
1
2
/*
3
* strindex.c -- "unsigned" lexical index
4
*
5
* $Id$
6
*/
7
8
#include <h/mh.h>
9
10
int
11
stringdex (char *p1, char *p2)
12
{
13
char *p;
14
15
if (p1 == NULL || p2 == NULL)
16
return -1;
17
18
for (p = p2; *p; p++)
19
if (uprf (p, p1))
20
return (p - p2);
21
22
return -1;
23
}