Locate substring (index, rindex)



examples/strings/index.cr
text = "The black cat climbed the green tree"

puts text.index("cat")
puts text.index("dog")

puts text.index("c")
puts text.rindex("c")