parameters: (line)
return_statement: return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line)
docstring: Removes //-comments and single-line C-style /* */ comments.
  
    Args:
      line: A line of C++ source.
  
    Returns:
      The line with single-line comments removed.
docstring_summary: Removes //-comments and single-line C-style /* */ comments.
docstring_tokens: Removes // - comments and single - line C - style / * * / comments .
function: def CleanseComments(line):
    """Removes //-comments and single-line C-style /* */ comments.
  
    Args:
      line: A line of C++ source.
  
    Returns:
      The line with single-line comments removed.
    """
    commentpos = line.find('//')
    if commentpos != -1 and not IsCppString(line[:commentpos]):
      line = line[:commentpos].rstrip()
    # get rid of /* ... */
    return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line)
function_tokens: def CleanseComments ( line ) : commentpos = line . find ( '//' ) if commentpos != - 1 and not IsCppString ( line [ : commentpos ] ) : line = line [ : commentpos ] . rstrip ( ) # get rid of /* ... */ return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS . sub ( '' , line )