Skip to content

Commit

Permalink
Auto stash before checking out "origin/main"
Browse files Browse the repository at this point in the history
  • Loading branch information
danngreen committed Dec 26, 2024
1 parent 4e6bc7b commit 859fb80
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions util/string_compare.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once
#include <algorithm>
#include <cctype>
#include <string_view>

//case insensitive less
constexpr bool less_ci(std::string_view a, std::string_view b) {
return std::ranges::lexicographical_compare(
a, b, [](const char char1, const char char2) { return std::tolower(char1) < std::tolower(char2); });
}

0 comments on commit 859fb80

Please sign in to comment.