跳转到内容

The Wikibooks community is developing a policy on the use of generative AI. Please review the draft policy and provide feedback on its talk page.

Rebol 编程/caret-to-offset

来自,开放的书籍,为开放的世界

用法

[编辑 | 编辑源代码]
CARET-TO-OFFSET face offset 

描述

[编辑 | 编辑源代码]

返回相对于字符位置的起始位置的偏移位置。

CARET-TO-OFFSET 是一个本机值。

参数

[编辑 | 编辑源代码]
  • face -- 包含文本的面。 (类型:对象)
  • offset -- 文本中的偏移量。 (类型:任何字符串)

源代码

[编辑 | 编辑源代码]
caret-to-offset: native[
    {Returns the offset position relative to the face of the character position.} 
    face [object!] "The face containing the text." 
    offset [any-string!] "The offset in the text."
]

华夏公益教科书