s = "hello world" puts s.include?("world") # index returns the position, or nil if absent puts s.index("o") p s.index("z")
include? and index