(s: string)
| 184 | } |
| 185 | |
| 186 | function trimTrailingWhitespace(s: string): string { |
| 187 | let end = s.length |
| 188 | while (end > 0 && (s[end - 1] === ' ' || s[end - 1] === '\t')) { |
| 189 | end-- |
| 190 | } |
| 191 | return s.slice(0, end) |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * Check if a config line like `[remote "origin"]` matches the given section/subsection. |