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/

相关文章:

stdin - 雷博尔 3 : reading STDIN efficiently line by line (to make awk like tool)

object - 为什么在Rebol2中动态添加代码到对象不生效?

rebol - 使用带解析的嵌套规则

linux - 如何在 Linux 64 位上运行 Rebol 脚本

rebol - rebol2 vid 应用程序中的请求日期

rebol - VID 或 R3-Gui 中的文本和插入符号

string - 如何在同一规则中混合字符串解析和 block 解析?

parsing - 如何用 Rebol PARSE 方言表达分支?

json - 使用 altjson 库创建 JSON 数组