Text.Contains

语法

Text.Contains(text as nullable text, substring as text, optional comparer as nullable function) as nullable logical

关于

检测 text 是否包含值 substring 。 如果找到文本,则返回 true。 此函数不支持通配符或正则表达式。

可选参数 comparer 可用于指定不区分大小写或区分区域性和区域设置的比较。 以下内置比较器支持公式语言:

示例 1

查找文本“Hello World”是否包含“Hello”。

使用情况

Text.Contains("Hello World", "Hello")

输出

true

示例 2

查找文本“Hello World”是否包含“hello”。

使用情况

Text.Contains("Hello World", "hello")

输出

false

示例 3

使用不区分大小写的比较器查找文本“Hello World”是否包含“Hello”。

使用情况

Text.Contains("Hello World", "hello", Comparer.OrdinalIgnoreCase)

输出

true

results matching ""

    No results matching ""