method

strip!

ruby latest stable - Class: String
strip!()
public

Removes leading and trailing whitespace from str. Returns nil if str was not altered.

Refer to strip for the definition of whitespace.