[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LTN9: Creating Strings Piece by Piece
- From: "Terence Martin" <odat@...>
- Date: Fri, 28 Sep 2001 19:14:55 -0700
> A "concat" function is planned to be added to the standard string library.
> It would receive a table and perhaps an optional string separator, to be
> between the strings in the table.
This sounds pretty sweet, especially the optional seperator string. Reminds
me of the [NSArray componentsJoinedByString] method from the OpenStep
Any thoughts on making a function that's the opposite as well? Something
that would take a string and a seperator and return a table whose elements
contained the original string split apart based on the separator. Or can
this be done with gsub without creating a bunch of temp strings? I'm not
very familiar with gsub so I'm not sure.
My experience with OpenStep has shown me that a couple of simple functions
like this can make a lot of text parsing tasks laughably simple. Having them
written in C to minimize the amount of temporary strings created would be a