Date: Fri, 5 Apr 2002 11:13:16 -0500 From: mpd <mpd6334@cs.rit.edu> To: Ilia Chipitsine <ilia@cgu.chel.su> Cc: questions@freebsd.org Subject: Re: Perl thing Message-ID: <20020405111316.A94450@rochester.rr.com> In-Reply-To: <Pine.BSF.4.10.10204052112080.13313-100000@jane.poka.net>; from ilia@cgu.chel.su on Fri, Apr 05, 2002 at 09:12:59PM %2B0600 References: <20020405090831.A93228@rochester.rr.com> <Pine.BSF.4.10.10204052112080.13313-100000@jane.poka.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 05, 2002 at 09:12:59PM +0600, Ilia Chipitsine wrote: > > cc: to hackers removed. > > > > > Perl has very useful "split" function, it "split"s a string according > > > arbitrary regular expression. Is there's such a C function ? > > > I'm moving few programs from Perl to C. > > > > > > > There's no standard function in C that will do this. > > Writing one to do so is trivial, though. > > > > There is a non-standard function called bufsplit() > > that would probably do what you want, but it's > > not part of the FreeBSD C library. > > is it a part of ports collection ? > > make search key=bufsplit > > doesn't say anything about it... No. It's just a non-standard C function. It's available on other Unices, but using it will cause your programs to be non-portable. The same goes for using strsep() as suggested earlier. strsep() is also not a standard function. I don't believe it handles regular expressions, either. mike -- ___________________________________________________________ "POKEY I LOVE YOUR NEW SHED!" - Little Girl from "POKEY AND THE SHED" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020405111316.A94450>