|
offstotabcol, tabcoltooffs
Purpose: Convert an offset from the start of a line to a column position in a line, assuming a tab width of eight. The line parameter must be a string, the offset parameter must be an integer. The line string may contain newlines. Legal offsets for the offset parameter range from zero to len(line). tabcoltooffs() is the inverse function of offstotabcol(). Return Values: Return an integer which denotes the column position for the offset. Example:
Purpose: Convert a column position in a line to a byte offset from the start of the line, assuming a tab width of eight. The line parameter must be a string, the offset parameter must be an integer. Return Values: Return an integer which denotes the largest offset whose on-screen column position is less than or equal to column. Return null if column is less than zero or behind the end of line.
Example:
© 1996-2009 H.E.I. All Rights Reserved | ||||||||||||||||