def mute_string(text):
<EOL>start = text.index(text[-<NUM_LIT:1>]) + <NUM_LIT:1><EOL>end = len(text) - <NUM_LIT:1><EOL>if text[-<NUM_LIT:3>:] in ('<STR_LIT>', "<STR_LIT>"):<EOL><INDENT>start += <NUM_LIT:2><EOL>end -= <NUM_LIT:2><EOL><DEDENT>return text[:start] + '<STR_LIT:x>' * (end - start) + text[end:]<EOL>
Replace contents with 'xxx' to prevent syntax matching.

    >>> mute_string('"abc"')
    '"xxx"'
    >>> mute_string("'''abc'''")
    "'''xxx'''"
    >>> mute_string("r'abc'")
    "r'xxx'"