Text.Range

语法

Text.Range(text as nullable text, offset as number, optional count as nullable number) as nullable text

关于

返回在文本 text 中偏移量 offset 处找到的 substring。 可以包含可选参数 count,以指定要返回的字符数。 如果没有足够的字符,则会引发错误。

示例 1

从文本“Hello World”中查找从索引 6 开始的 substring。

使用情况

Text.Range("Hello World", 6)

输出

"World"

示例 2

从文本“Hello World Hello”中查找从索引 6 开始且涵盖 5 个字符的 substring。

使用情况

Text.Range("Hello World Hello", 6, 5)

输出

"World"