projects
/
mmh
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
03910fdff32e014603741d6e8fafb198be21d40f
[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
}