Find 函数
适用于:画布应用桌面流模型驱动应用 Power Pages Power Platform CLI
在其他字符串中查找文本字符串(如果存在)。
描述
Find 函数在其他字符串中查找字符串,且区分大小写。 若要忽略大小写,需首先对参数使用 Lower 函数。
Find 返回找到的字符串的起始位置。 位置 1 是字符串的第一个字符。 如果在其中进行搜索的字符串中不包含要搜索的字符串,Find 将返回空白。
语法
Find( FindString, WithinString [, StartingPosition ] )
- FindString - 必需。 要查找的字符串。
- WithinString - 必需。 要在其中搜索的字符串。
- StartingPosition - 可选。 开始搜索的起始位置。 位置 1 是第一个字符。
示例
公式 | Description | 结果 |
---|---|---|
Find("World", "Hello World") | 返回 "World" 的起始位置。 | 7 |
Find("World", "Hello World, Hello World", 10) | 第 10 个字符之后返回第一次出现 "World" 的起始位置。 | 20 |
Find("Mars", "Hello World") | 由于 FindString 不在 WithinString 中,因此返回空白 | Blank() |