我想知道如何比较部分匹配的字符串。例如,
要查看是否在句子中找到短语“example”,请说“this is an example”?
最佳答案
使用来自 SRFI 13 的 string-contains
:
> (require srfi/13)
> (string-contains "this is an example" "example")
11
> (string-contains "this is an example" "hexample")
#f
关于scheme - 如何比较 Racket 中的部分字符串匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21265127/