[patch] add ip addr del alias for delete [was: Re: ipaddr applet query]

Rob Landley rob at landley.net
Fri Mar 31 20:51:46 UTC 2006


On Friday 31 March 2006 3:12 pm, Natanael Copa wrote:
> > And then submatch(input,"walrus") should match "walrus", "walru", "walr",
> > "wal", "wa", and "w".
>
> isn't that exactly the same as using strstr?
>
> const char *walrus = "walrus";
> if (strstr(walrus, input) == walrus) {
>   /* match! */
> }

Huh, I'd initially dismissed strstr because "wal" is found in both "walrus" 
and "drywall", but comparing with the start fixes that, so yeah, that should 
work fine. :)

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list