hack/bin/main.cpp

25 lines
634 B
C++
Raw Normal View History

2022-03-01 12:03:12 +03:00
#include <iostream>
#include "string/string.hpp"
2022-03-02 11:08:14 +03:00
#include "range/range.hpp"
2022-03-02 12:11:21 +03:00
#include "container/container.hpp"
2022-02-28 12:44:18 +03:00
int main(int argc, char *argv[])
{
2022-03-02 11:08:14 +03:00
{// ex: split_str
std::string str { "asdf,qwer,zxcv" };
2022-03-02 12:11:21 +03:00
hack::string::v_str v = hack::string::split_str(str, ',');
2022-03-02 11:08:14 +03:00
for (const auto& c : v) std::cout << c << std::endl;
}
2022-03-01 12:03:12 +03:00
2022-03-02 11:08:14 +03:00
{// ex: within
2022-03-02 12:11:21 +03:00
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;
2022-03-02 11:08:14 +03:00
}
2022-02-28 12:44:18 +03:00
}