...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user