Strings In Depth11 / 19
Up next

start_with? / end_with?

name = "report.txt"
puts name.start_with?("rep")
# several candidates can be checked at once
puts name.end_with?(".txt", ".md")
What you're solving

prefix and suffix tests