method

beginning_of_line?

v1_8_7_72 - Show latest stable - Class: StringScanner
beginning_of_line?()
public

Returns true iff the scan pointer is at the beginning of the line.

  s = StringScanner.new("test\ntest\n")
  s.bol?           # => true
  s.scan(/te/)
  s.bol?           # => false
  s.scan(/st\n/)
  s.bol?           # => true
  s.terminate
  s.bol?           # => true