cli : cleanup auto-completion code (#21745)

This commit is contained in:
Matthias Straka
2026-04-23 15:03:28 +02:00
committed by GitHub
parent 550d684bd1
commit 0dd7f915fd
2 changed files with 19 additions and 14 deletions
+5
View File
@@ -746,6 +746,11 @@ inline bool string_starts_with(std::string_view str, std::string_view prefix) {
str.compare(0, prefix.size(), prefix) == 0;
}
// remove when moving to c++20
inline bool string_starts_with(std::string_view str, char prefix) {
return !str.empty() && str.front() == prefix;
}
// remove when moving to c++20
inline bool string_ends_with(std::string_view str, std::string_view suffix) {
return str.size() >= suffix.size() &&