MCPcopy Index your code
hub / github.com/DHTMLX/gantt / countColumn

Function countColumn

samples/common/codehighlight/codemirror.js:161–174  ·  view source on GitHub ↗
(string, end, tabSize, startIndex, startValue)

Source from the content-addressed store, hash-verified

159 // Counts the column offset in a string, taking tabs into account.
160 // Used mostly to find indentation.
161 function countColumn(string, end, tabSize, startIndex, startValue) {
162 if (end == null) {
163 end = string.search(/[^\s\u00a0]/);
164 if (end == -1) { end = string.length; }
165 }
166 for (var i = startIndex || 0, n = startValue || 0;;) {
167 var nextTab = string.indexOf("\t", i);
168 if (nextTab < 0 || nextTab >= end)
169 { return n + (end - i) }
170 n += nextTab - i;
171 n += tabSize - (n % tabSize);
172 i = nextTab + 1;
173 }
174 }
175
176 var Delayed = function() {
177 this.id = null;

Callers 5

codemirror.jsFile · 0.85
findStartLineFunction · 0.85
posFromMouseFunction · 0.85
extendToFunction · 0.85
indentLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected