(string, end, tabSize)
| 3117 | // Counts the column offset in a string, taking tabs into account. |
| 3118 | // Used mostly to find indentation. |
| 3119 | function countColumn(string, end, tabSize) { |
| 3120 | if (end == null) { |
| 3121 | end = string.search(/[^\s\u00a0]/); |
| 3122 | if (end == -1) end = string.length; |
| 3123 | } |
| 3124 | for (var i = 0, n = 0; i < end; ++i) { |
| 3125 | if (string.charAt(i) == "\t") n += tabSize - (n % tabSize); |
| 3126 | else ++n; |
| 3127 | } |
| 3128 | return n; |
| 3129 | } |
| 3130 | |
| 3131 | function computedStyle(elt) { |
| 3132 | if (elt.currentStyle) return elt.currentStyle; |
no test coverage detected