Returns the number of '$' characters right in front of s[i].
(self, s, i)
| 126 | self._line('default %s' % ' '.join(as_list(paths))) |
| 127 | |
| 128 | def _count_dollars_before_index(self, s, i): |
| 129 | """Returns the number of '$' characters right in front of s[i].""" |
| 130 | dollar_count = 0 |
| 131 | dollar_index = i - 1 |
| 132 | while dollar_index > 0 and s[dollar_index] == '$': |
| 133 | dollar_count += 1 |
| 134 | dollar_index -= 1 |
| 135 | return dollar_count |
| 136 | |
| 137 | def _line(self, text, indent=0): |
| 138 | """Write 'text' word-wrapped at self.width characters.""" |