如何检查字符串是否包含在 Crystal Lang 的子字符串中?

How to check if a string is contained in a substring in Crystal Lang?

我在 Crystal API 中没有看到 String#contains 方法或 String#search 方法。

String#includes? which checks if the search exists in the string and returns a bool or String#index其中returns搜索的索引如果存在