summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/ide/completion/text/case.h
blob: 8cad09412e633a765974e1eb1617e35fa1549bb4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include <util/generic/string.h>

namespace NSQLComplete {

bool NoCaseCompare(const TString& lhs, const TString& rhs);

inline auto NoCaseCompareLimit(size_t size) {
    return [size](const TString& lhs, const TString& rhs) -> bool {
        return strncasecmp(lhs.data(), rhs.data(), size) < 0;
    };
}

} // namespace NSQLComplete