removeComments static method

String removeComments(
  1. String content,
  2. CommentStyle style
)

Remove comments based on the comment style

Implementation

static String removeComments(String content, CommentStyle style) {
  switch (style) {
    case CommentStyle.cStyle:
      return _removeCStyleComments(content);
    case CommentStyle.pythonStyle:
      return _removePythonStyleComments(content);
    case CommentStyle.hashStyle:
      return _removeHashStyleComments(content);
    case CommentStyle.htmlStyle:
      return _removeHtmlStyleComments(content);
    case CommentStyle.mixedWeb:
      return _removeMixedWebComments(content);
  }
}