Does a string include another string : include « String « Ruby






Does a string include another string

string = 'My first string'                   # => "My first string"

string.include? 'MY'                     # => true

 

Related examples in the same category

1.Testing for presence of substring