def IsCppString(line):
    """Does line terminate so, that the next symbol is in string constant.

  This function does not consider single-line nor multi-line comments.

  Args:
    line: is a partial line of code starting from the 0..n.

  Returns:
    True, if next character appended to 'line' is inside a
    string constant.
  """
    line = line.replace('\\\\', 'XX')
    return line.count('"') - line.count('\\"') - line.count('\'"\'') & 1 == 1
