rebol - 检查 REBOL 字符串是否包含另一个字符串

标签 rebol

我尝试使用 find函数检查字符串 "ll" 的出现在字符串中 "hello" ,但它返回 "ll"而不是 truefalse :

"This prints 'll'"
print find "hello" "ll"

REBOL 的标准库是否有任何函数来检查一个字符串是否包含另一个字符串?

最佳答案

尝试这个

>> print found? find "hello" "ll"
true
>> print found? find "hello" "abc"
false

关于rebol - 检查 REBOL 字符串是否包含另一个字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25252375/

相关文章:

rebol - `context` 和 `object` 和有什么区别?

conditional-statements - Rebol 的任一条件都无法正常工作

redis - "glob"样式模式是否应保留为字符串!还是有更聪明的方法?

rebol - Rebol 适合填写在线网络表格吗?

rebol - REBOL3-不同分支之间有什么区别?

metaprogramming - Rebol 中的级联

rebol - 我如何在 Rebol 中使用字符串从 block 中选取元素?

rebol - 日期减法为什么我得不到hh :mm:ss in Rebol/Red?

parsing - 方言和解析的最佳介绍?

rebol - 如何在服务器上启动 Rebol2/View 控制台?