Check out example codes for "if string contain string ruby". It will help you in understanding the concepts better.

Code Example 1

# Ruby program to demonstrate  
# the include?  method  
       
# Taking a string and  
# using the method 
puts "Ruby".include? "by"                 
puts "String".include? "ui"

Learn ReactJs, React Native from akashmittal.com