// 在 字符串1中查找字符串2,并返回第一次找到的位置
int strfpos( const char *s1, const char *s2 )
{
int pos=-1;
int len2;
if ( !(len2 = strlen(s2)) )
return -1;
for (;*s1;++s1)
{
pos++;
if ( *s1 == *s2 && strncmp( s1, s2, len2 )==0 )
return pos;
}
return -1;
}