Strip surrounding quotes from a string, return arena-allocated copy */
| 53 | |
| 54 | /* Strip surrounding quotes from a string, return arena-allocated copy */ |
| 55 | static const char *strip_quotes(CBMArena *a, const char *text) { |
| 56 | if (!text || !text[0]) { |
| 57 | return NULL; |
| 58 | } |
| 59 | int len = (int)strlen(text); |
| 60 | if (len >= CBM_QUOTE_PAIR && (text[0] == '"' || text[0] == '\'')) { |
| 61 | return cbm_arena_strndup(a, text + CBM_QUOTE_OFFSET, (size_t)(len - CBM_QUOTE_PAIR)); |
| 62 | } |
| 63 | return text; |
| 64 | } |
| 65 | |
| 66 | // Callee suffixes for IRIS Python interop string-dispatch. Kept at file scope |
| 67 | // (not inside the function) to satisfy cppcheck variableScope. |
no test coverage detected