shellScriptLineIsComment function

bool shellScriptLineIsComment(
  1. String line
)

True if the line is a comment.

line must have been trimmed before

Implementation

bool shellScriptLineIsComment(String line) {
  return line.startsWith('#') ||
      line.startsWith('// ') ||
      line.startsWith('/// ') ||
      (line == '//') ||
      (line == '///');
}