Skip to content

Commit 859fb80

Browse files
committed
Auto stash before checking out "origin/main"
1 parent 4e6bc7b commit 859fb80

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

util/string_compare.hh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#pragma once
2+
#include <algorithm>
3+
#include <cctype>
4+
#include <string_view>
5+
6+
//case insensitive less
7+
constexpr bool less_ci(std::string_view a, std::string_view b) {
8+
return std::ranges::lexicographical_compare(
9+
a, b, [](const char char1, const char char2) { return std::tolower(char1) < std::tolower(char2); });
10+
}

0 commit comments

Comments
 (0)