如何在 Lotus Script Querysave 中查找字符串中的子字符串

How to find substring in string in Lotus Script Querysave

我有一个名为 Status 的字段,我在 Querysave.

中用 source.FieldGetText("Status") 查询

此状态可以是

现在我的问题是 Instr:

If Instr("two",Status) > 0 Then...
每个状态的

return 是:

为什么案例 3 和案例 4 的 return 1 与案例 2 不同? 据我了解,Instr Checks if the substring is in the String and returns it's position which should be 1 for Case 3 & 4 as well?

仅供参考 Python 我会这样做:

if "test" in "this is a test":
    print("String contains test")

它应该反过来工作:

If Instr(status, "two") > 0 Then..

Instr()第一个参数是你要搜索的字符串,第二个参数是你要搜索的字符串。