| 241 | } |
| 242 | |
| 243 | static Result appendEscapedCString(StringBuilder& builder, StringView text) |
| 244 | { |
| 245 | for (size_t idx = 0; idx < text.sizeInBytes(); ++idx) |
| 246 | { |
| 247 | const char ch = text.bytesWithoutTerminator()[idx]; |
| 248 | if (ch == '\\' or ch == '"') |
| 249 | { |
| 250 | SC_TRY(builder.append("\\")); |
| 251 | } |
| 252 | const char character[] = {ch, 0}; |
| 253 | SC_TRY(builder.append(StringView::fromNullTerminated(character, StringEncoding::Utf8))); |
| 254 | } |
| 255 | return Result(true); |
| 256 | } |
| 257 | |
| 258 | static Result normalizeRelativePathForCompileDefine(String& path) |
| 259 | { |
no test coverage detected