Create initializer for a C char[]/ char * variable from a string. For example, if value if b'foo', the result would be '"foo"'.
(value: bytes)
| 47 | |
| 48 | |
| 49 | def c_string_initializer(value: bytes) -> str: |
| 50 | """Create initializer for a C char[]/ char * variable from a string. |
| 51 | |
| 52 | For example, if value if b'foo', the result would be '"foo"'. |
| 53 | """ |
| 54 | return '"' + encode_bytes_as_c_string(value) + '"' |
no test coverage detected
searching dependent graphs…