Document.wordRangeAt

Returns the word range at a given line/column position.

  1. TextRange wordRangeAt(Position position)
    struct Document
    const
    wordRangeAt
  2. size_t[2] wordRangeAt(size_t bytes)

Examples

Document d;
d.setContent(`void main() { writeln("hello world"); }`);
assert(d.wordRangeAt(Position(0, 0)) == TextRange(0, 0, 0, 4));

Meta