TextPosition
Holds the row and column data for caret/anchor positions within a TextArea. Both row and column are zero based, so the start of a document is (0,0).
NOTE, Think of a TextPosition representing a vertical line next to a character. Do NOT think of it as an index of a particular character.
This is important when considering the range of acceptable values. If a line contains "Hi"
, then column can range from 0 to 2 INCLUSIVE. (the imaginary line can be after the i
).
It's also important to realise that it is meaningless to ask what is the character at this [TextPosition]
only after or before a TextPosition.