aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/complete/text/case.h
blob: 883cb7f5048999ed237ce2c441768cca07f73d52 (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