add container v_multiset
This commit is contained in:
11
bin/main.cpp
11
bin/main.cpp
@@ -2,16 +2,23 @@
|
||||
|
||||
#include "string/string.hpp"
|
||||
#include "range/range.hpp"
|
||||
#include "container/container.hpp"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
{// ex: split_str
|
||||
std::string str { "asdf,qwer,zxcv" };
|
||||
hack::v_str v = hack::split_str(str, ',');
|
||||
hack::string::v_str v = hack::string::split_str(str, ',');
|
||||
for (const auto& c : v) std::cout << c << std::endl;
|
||||
}
|
||||
|
||||
{// ex: within
|
||||
std::cout << hack::within(12, 34, 12, 23, 31) << std::endl;
|
||||
std::cout << std::boolalpha << hack::range::within(12, 34, 12, 23, 31, 17, 22, 33) << std::endl;
|
||||
}
|
||||
|
||||
{// ex: v_multiset
|
||||
std::vector<std::string> v;
|
||||
hack::container::v_multiset(v, "asdf", "qwer", "zcv");
|
||||
for(const auto& c : v) std::cout << c << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
deps += string_dep
|
||||
deps += range_dep
|
||||
deps += range_dep
|
||||
|
||||
executable(
|
||||
'hack', 'main.cpp',
|
||||
|
||||
Reference in New Issue
Block a user