123456789101112131415161718192021222324 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- @author: Deepcold
- @file: transferSql.py
- @time: 2019/9/3 11:39
- """
- def transfer(content):
- if content is None:
- return None
- else:
- string = ""
- for c in content:
- if c == '"':
- string += '\\\"'
- elif c == "'":
- string += "\\\'"
- elif c == "\\":
- string += "\\\\"
- else:
- string += c
- return string
|