You can use the include? method: my_string = "abcdefg" if my_string.include? "cde" puts "String includes 'cde'" end.
確定! 回上一頁