StackOverflow 文档 Ruby Language 教程 字符串 字符串以。结尾 字符串以。结尾 Created: November-22, 2018 要查找字符串是否以模式结尾,end_with? 方法会派上用场 str = "I like pineapples" str.end_with?("pineaaples") => false 多行字符串字符串插值