1
0

feat: add trim in string op opposited with strip

This commit is contained in:
2025-10-01 20:53:43 +08:00
parent 05a80268ab
commit 446f880df4
5 changed files with 153 additions and 7 deletions

View File

@ -15,4 +15,12 @@ namespace yyccbench::string::op {
}
BENCHMARK(BM_StringStrip)->Name("StringStrip");
static void BM_StringTrim(benchmark::State& state) {
std::u8string_view strl = u8" \thello\r\n"sv, words = u8" \t\r\n"sv;
for (auto _ : state) {
auto rv = OP::trim(strl, words);
}
}
BENCHMARK(BM_StringTrim)->Name("StringTrim");
}