From: "Berger, Daniel" Date: 2006-05-19T01:07:15+09:00 Subject: Re: String#nstrip ? > -----Original Message----- > From: Daniel Berger [mailto:Daniel.Berger@qwest.com] > Sent: Thursday, May 18, 2006 9:48 AM > To: ruby-core@ruby-lang.org > Subject: String#nstrip ? Slight copy/paste bug there. It should just be: # nullbench.rb require 'benchmark' MAX = 100000 STRING = "hello\0\0\0\0" Benchmark.bm do |x| x.report("String#split"){ MAX.times{ STRING.split("\0").first } } x.report("String#nstrip"){ MAX.times{ STRING.nstrip } } end Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.