29 lines
699 B
C++
29 lines
699 B
C++
#include <print>
|
|
// #include "../utils/snplib_string.h"
|
|
// #include "../include/snipplib/snplib_string.h"
|
|
#include <snipplib/utils/snplib_string.h>
|
|
|
|
using namespace snplib;
|
|
int main()
|
|
{
|
|
std::string si = " dewf wek e lwekjflkj ";
|
|
|
|
auto s = snplib_trim_spaces(si);
|
|
|
|
std::println("s = '{}'", s);
|
|
|
|
auto sv = snplib_trim_spaces_as_view(si, TrimType::TRIM_LEFT);
|
|
|
|
std::println("sv(TrimType::TRIM_LEFT) = '{}'", sv);
|
|
|
|
sv = snplib_trim_spaces_as_view(si, TrimType::TRIM_RIGHT);
|
|
|
|
std::println("sv(TrimType::TRIM_RIGHT) = '{}'", sv);
|
|
|
|
sv = snplib_trim_spaces_as_view(si, TrimType::TRIM_BOTH);
|
|
|
|
std::println("sv(TrimType::TRIM_BOTH) = '{}'", sv);
|
|
|
|
|
|
return 0;
|
|
} |