Just a bit more food for thought, you might also like to consider doing this for collections as well. Returning a subset of an array for example. -- Brandon Cherry
On 9/18/2014 9:32 AM, Rick McGuire wrote: > Another idea I've been toying with for a while is adding a square > brackets method to the string class. This is a little bit like > substr(), but the default length is 1 rather than the rest of the > string. This would be fairly natural for scanning/parsing applications > where you are looking at single characters: > > if option[1] == 'a' then do .... > > A length can also be specified to extract additional characters. > > if option[1, 2] == '-a" then do.... > > Unlike substr, this method will not do any padding. > > This will also be added to mutablebuffer, of course. It might also be > desirable to have a "[]=" method on mutablebuffer for editing-type > operations, although it's not clear if this should be an insert or an > overlay operation. > > Rick ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
