This commit is contained in:
2026-06-23 12:44:12 +03:00
parent 44add664d3
commit 97ad939095
3 changed files with 173 additions and 5 deletions

View File

@@ -24,6 +24,24 @@ int main()
std::println("sv(TrimType::TRIM_BOTH) = '{}'", sv);
si = "123; we; d34534; ";
std::vector<std::string_view> rv;
rv = snplib_split_char_range<decltype(rv)>(si, "; ");
std::println("\n\nstr = '{}'", si);
std::println("all elems: ");
for (auto& el : rv) {
std::println("el = '{}'", el);
}
rv = snplib_split_char_range<decltype(rv)>(si, "; ", 1, 2);
std::println("2 elems starting from 1: ");
for (auto& el : rv) {
std::println("el = '{}'", el);
}
return 0;
}