aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/digest/lower_case/lchash.h
blob: 007d723e21041cca887478d98cd2b3003ca1ae17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once 
 
#include "lciter.h" 
 
#include <util/digest/fnv.h> 
#include <util/generic/strbuf.h> 
 
template <class T> 
static inline T FnvCaseLess(const char* b, size_t l, T t = 0) noexcept {
    using TIter = TLowerCaseIterator<const char>;
 
    return FnvHash(TIter(b), TIter(b + l), t); 
} 
 
template <class T> 
static inline T FnvCaseLess(const TStringBuf& s, T t = 0) noexcept {
    return FnvCaseLess(s.data(), s.size(), t);
}