/************************************************************* * File: lib/strbequ.c * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: * 970304 Start of revision history */ #include "string.h" /** int strbequ(s1,s2) return 1 if s2 matches 1st part of s1 */ int strbequ(s1,s2) char *s1,*s2; { if (!s1 || !s2) return(0); for (;*s1 && *s2;s1++,s2++) if (*s1 != *s2) return(0); if (! *s2) return(1); return(0); }