Create a new range from two positions. If start
is not
before or equal to end
, the values will be swapped.
Create a new range from number coordinates. It is a shorter equivalent of
using new Range(new Position(startLine, startCharacter), new Position(endLine, endCharacter))
A zero-based line value.
A zero-based character value.
A zero-based line value.
A zero-based character value.
The start position. It is before or equal to end.
The end position. It is after or equal to start.
true
if start
and end
are equal.
true
if start.line
and end.line
are equal.
Derived a new range from this range.
A position that should be used as start. The default value is the current start.
A position that should be used as end. The default value is the current end.
A range derived from this range with the given start and end position.
If start and end are not different this
range will be returned.
Derived a new range from this range.
A range that reflects the given change. Will return this
range if the change
is not changing anything.
友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场
表示两个位置之间的文本范围。
请注意,范围是不可变的。使用 with 或 intersection、union 方法从现有范围派生新范围。