]>
diplodocus.org Git - nmh/blob - sbr/uprf.c
1 /* uprf.c -- "unsigned" lexical prefix
3 * This code is Copyright (c) 2002, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information.
12 /* uprf returns true if s starts with prefix, ignoring case.
13 * Otherwise false. If s or prefix are NULL then false results. */
15 uprf(const char *s
, const char *prefix
)
17 unsigned char *us
, *up
;
21 us
= (unsigned char *)s
;
22 up
= (unsigned char *)prefix
;
24 while (*us
&& tolower(*us
) == tolower(*up
)) {