Brackets and Searches

Submitted By:
david

Difficulty:
Elementary

Tags:
strings

Instructions:
Use brackets to search a string to see if it contains an "e".

Code:
assert_equal "hello world"[___, "e"
assert_equal "what"[___,        nil
assert_equal "rubeque"[___,     "e"
assert_equal "E"[___,           nil

Your Solution

Ruby 1.9.3

Back to Problems