class String

Public Instance Methods

squish!() click to toggle source

Stolen from Rails

# File lib/event_counter.rb, line 157
def squish!
  gsub!(/\A[[:space:]]+/, '')
  gsub!(/[[:space:]]+\z/, '')
  gsub!(/[[:space:]]+/, ' ')
  self
end