From: MiG Date: 2004-09-23T17:11:05+09:00 Subject: Re: whitespace string only I think regexp should be is faster than each_byte. What about this? class String def whitespace_only? str str.split(/\n/).each { |x| return false unless x =~ /^\s*$/ } true end end MiG