Remove quotes from around a string.
(string)
| 92 | |
| 93 | |
| 94 | def dequote(string): |
| 95 | """Remove quotes from around a string.""" |
| 96 | if ( ( string.startswith('"') and string.endswith('"')) |
| 97 | or (string.startswith("'") and string.endswith("'")) ): |
| 98 | return string[1:-1] |
| 99 | else: |
| 100 | return string |
| 101 | |
| 102 | ATTR_RE = re.compile("\{@([^\}]*)=([^\}]*)}") # {@id=123} |
| 103 |
no outgoing calls
no test coverage detected