strip method

String strip(
  1. String line, {
  2. bool includeQuotes = false,
})

Strips comments (trailing or whole-line).

Implementation

String strip(String line, {bool includeQuotes = false}) =>
    line.replaceAll(includeQuotes ? _commentWithQuotes : _comment, '').trim();