instance method
normalise_space
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.2.3 PrivateSignature
normalise_space(text)
Removes leading and trailing whitespace and sequences of whitespaces from a string.
- text
-
String to be normalised.
Parameters
-
textreq
Source
# File activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb, line 902
def normalise_space(text)
text.strip.gsub(/\s\s+/, ' ')
end
Defined in activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb line 902
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in XmlSimple