parameters: (string)
return_statement: return string.replace('$', '$$')
docstring: Escape a string such that it can be embedded into a Ninja file without
      further interpretation.
docstring_summary: Escape a string such that it can be embedded into a Ninja file without
      further interpretation.
docstring_tokens: Escape a string such that it can be embedded into a Ninja file without further interpretation .
function: def escape(string):
      """Escape a string such that it can be embedded into a Ninja file without
      further interpretation."""
      assert '\n' not in string, 'Ninja syntax does not allow newlines'
      # We only have one special metacharacter: '$'.
      return string.replace('$', '$$')
function_tokens: def escape ( string ) : assert '\n' not in string , 'Ninja syntax does not allow newlines' # We only have one special metacharacter: '$'. return string . replace ( '$' , '$$' )