Quote and escape a string for TOON encoding. Args: value: String to quote Returns: Quoted and escaped string
(value: str)
| 115 | |
| 116 | |
| 117 | def quote_string(value: str) -> str: |
| 118 | """ |
| 119 | Quote and escape a string for TOON encoding. |
| 120 | |
| 121 | Args: |
| 122 | value: String to quote |
| 123 | |
| 124 | Returns: |
| 125 | Quoted and escaped string |
| 126 | """ |
| 127 | escaped = escape_string(value) |
| 128 | return f'{QUOTE}{escaped}{QUOTE}' |
| 129 | |
| 130 | |
| 131 | def is_primitive(value: Any) -> bool: |
no test coverage detected
searching dependent graphs…