Skip to content

CodeMirrorModule.countColumn method

CodeMirrorModule › countColumn

Unofficial

Finds the column position at a given string index using a given tab size.

Signature:

countColumn(line: string, index: number | null, tabSize: number): number

Parameters:

Parameter Type Description
line string The line string.
index number | null The string index (or null for end of line).
tabSize number The tab size.

Returns: numberThe column number.