[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [patch] add ip addr del alias for delete [was: Re: ipaddr	applet
From:       Rob Landley <rob () landley ! net>
Date:       2006-03-31 20:51:46
Message-ID: 200603311551.46917.rob () landley ! net
[Download RAW message or body]

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.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic