isComment method

bool isComment (String line)

Returns whether the string contains comment or not.

Implementation

bool isComment(String line) {
  line = line.trim();
  final regex = RegExp(r'#.*');
  return regex.hasMatch(line) ? true : false;
}