int
isfrom(const char *string)
{
- return (strncmp (string, "From ", 5) == 0
- || strncmp (string, ">From ", 6) == 0);
+ return (has_prefix(string, "From ")
+ || has_prefix(string, ">From "));
}
static int
isat (const char *p)
{
- return (strncmp (p, " AT ", 4)
- && strncmp (p, " At ", 4)
- && strncmp (p, " aT ", 4)
- && strncmp (p, " at ", 4) ? FALSE : TRUE);
+ return has_prefix(p, " AT ") || has_prefix(p, " At ") ||
+ has_prefix(p, " aT ") || has_prefix(p, " at ");
}