MCPcopy Create free account
hub / github.com/WallBreaker2/op / split_csv

Function split_csv

libop/capture/sources/MemoryImageSource.cpp:70–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70std::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
85bool copy_raw_image(std::span<const std::byte> src, int width, int height, const std::wstring &fmt, Image &dst) {
86 dst.create(width, height);

Callers 1

ParseMemoryImageSourceFunction · 0.85

Calls 3

trim_wsFunction · 0.85
findMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected