"ts" <decoux / moulon.inra.fr> schrieb im Newsbeitrag news:200409231451.i8NEphE08333 / moulon.inra.fr... > >>>>> "A" == Ara T Howard <Ara.T.Howard / noaa.gov> writes: > > A> if s.strip.empty? > A> # the string is whitespace only > > svg% ruby -e 'a = " \000\000"; p "OK" if a.strip.empty?' > "OK" > svg% > > svg% ruby -e 'a = " \000\000 "; p "OK" if a.strip.empty?' > svg% Also I'd say the disadvantage of "a.strip.empty?" is that it creates a copy of the string (=> a new instance) which is generally slower than a simple regexp check. Kind regards robert