From: James Edward Gray II Date: 2007-04-09T23:06:57+09:00 Subject: Re: Substring like in PHP's substr()? On Apr 9, 2007, at 8:33 AM, Rick DeNatale wrote: > On 4/9/07, James Edward Gray II wrote: >> >> data = "/Users/Josh/Webwork/pgbookings" >> prefix = "/Webwork/pgbookings" > > I think you meant > prefix = "/Users/Josh" > > This doesn't affect the qualitative results of the benchmark but it > does change it to do what the OP was trying to do. Oops, I did. Thank you. > And cosmetically there's a typo: > >> results.report("[i..-i]:") { TESTS.times { data >> [prefix.length..-1] } } > > should be: > > results.report("[i..-1:") { TESTS.times { data > [prefix.length..-1] } } Yeah, I blew that one, didn't I? Thanks for the corrections. James Edward Gray II