【问题标题】:How to use Not contains function in string in UIPath?如何在 UIPath 的字符串中使用 Not contains 函数?
【发布时间】:2018-03-20 15:51:47
【问题描述】:

我试图找到可以在 UIPath 中将 Not 关键字与 String.Contains 条件一起使用的语法。

示例:我有以下变量。

strValue = “这是测试”

我想检查变量中是否不存在“测试”字样,然后它应该显示一些消息。

我尝试了以下方法,但没有成功。

Not strValue.Contains(“Test”)

【问题讨论】:

  • 你使用什么语言?

标签: uipath


【解决方案1】:

您可以使用 indexOf()。如果要搜索的值不存在于字符串中,它将返回 -1。

strValue = “This is Test”
var i = strValue.indexOf("Test");
if(i>0){
  console.log('Test is present in strValue');
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-29
    • 2012-06-16
    • 1970-01-01
    • 2012-12-03
    • 1970-01-01
    • 2011-11-29
    • 2017-08-15
    • 2016-08-06
    相关资源
    最近更新 更多