| 68 | } |
| 69 | |
| 70 | std::vector<std::wstring> split_csv(const std::wstring &text) { |
| 71 | std::vector<std::wstring> tokens; |
| 72 | size_t start = 0; |
| 73 | while (start <= text.size()) { |
| 74 | size_t pos = text.find(L',', start); |
| 75 | if (pos == std::wstring::npos) { |
| 76 | tokens.emplace_back(trim_ws(text.substr(start))); |
| 77 | break; |
| 78 | } |
| 79 | tokens.emplace_back(trim_ws(text.substr(start, pos - start))); |
| 80 | start = pos + 1; |
| 81 | } |
| 82 | return tokens; |
| 83 | } |
| 84 | |
| 85 | bool copy_raw_image(std::span<const std::byte> src, int width, int height, const std::wstring &fmt, Image &dst) { |
| 86 | dst.create(width, height); |
no test coverage detected