Method: WatirRobot::Parser#trim_sides

Defined in:
lib/watir_robot/parser.rb

#trim_sides(s) ⇒ Strgin

(Non-keyword) Small utility for trimming whitespace from both sides of a string

Parameters:

  • s (String)

    string to trim both sides of

Returns:

  • (Strgin)

    the same string without whitespace on the left or right sides



167
168
169
170
171
# File 'lib/watir_robot/parser.rb', line 167

def trim_sides(s)
  s = s.lstrip
  s = s.rstrip
  return s
end