org.incava.text
Class LineMapping
ArrayList
org.incava.text.LineMapping
public class LineMapping
extends ArrayList
Converts from 0-indexed string positions to line:column values. Lines and
columns are 1-indexed, matching the Java parser.
LineMapping(String text, int startLine, int startColumn)
|
Location | getLocation(int pos) - Converts the string position to a line:column location.
|
Location[] | getLocations(Point pos) - Converts the string position to a line:column start and end location.
|
Location[] | getLocations(int startPos, int endPos) - Converts the string position to a line:column start and end location.
|
LineMapping
public LineMapping(String text,
int startLine,
int startColumn)
getLocation
public Location getLocation(int pos)
Converts the string position to a line:column location.
getLocations
public Location[] getLocations(Point pos)
Converts the string position to a line:column start and end location.
getLocations
public Location[] getLocations(int startPos,
int endPos)
Converts the string position to a line:column start and end location.