removeCommentsFromLine method

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

Strips comments (trailing or whole-line).

Implementation

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