Interface TextRange

  • public interface TextRange
    Represents a text range in an InputFile. A range is delimited by two TextPointer.
    • TextRange(TextPointer(1, 0), TextPointer(1, 1)) represents the first character at line 1
    • TextRange(TextPointer(1, 0), TextPointer(1, 10)) represents the 10 first characters at line 1
    See Also:
    InputFile.newRange(int, int, int, int)
    • Method Detail

      • start

        TextPointer start()
        Start position of the range
      • overlap

        boolean overlap​(TextRange another)
        Test if the current range has some common area with another range. Exemple: say the two ranges are on same line. Range with offsets [1,3] overlaps range with offsets [2,4] but not range with offset [3,5]