<quote who="Alan Young"> > On Fri, 04 Mar 2005 17:36:50 -0700, Peter Bowen <[EMAIL PROTECTED]> > wrote: >> I suggested it because this is what pack/unpack was designed to do... >> extract data from streams. In this case a null terminated string. > > Seems to me a trivial usage of pack, and not as clear to follow up > programmers. I'd automatically look for more than was there. Plus, > he didn't say he wanted to get rid of *all* nulls, just at the end of > the string. You're example would strip the nulls.
Just to conclude this thread, I can report that chop worked fine for removing the trailing NULL. Howver, in the end, I configured the server to not append 0x00 to strings sent to the client. --Dave .===================================. | This has been a P.L.U.G. mailing. | | Don't Fear the Penguin. | | IRC: #utah at irc.freenode.net | `==================================='