start ...

This commit is contained in:
2026-06-17 01:45:40 +03:00
commit 60a261f18c
9 changed files with 393 additions and 0 deletions

29
examples/str_exam.cpp Normal file
View File

@@ -0,0 +1,29 @@
#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;
}