summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/collator.cpp
blob: a5dbc614af5a49112093039e0e20c41aec86fbb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <mbgl/style/expression/collator.hpp>

namespace mbgl {
namespace style {
namespace expression {

Collator::Collator(bool caseSensitive, bool diacriticSensitive, const optional<std::string>& locale)
    : collator(platform::Collator(caseSensitive, diacriticSensitive, locale)) {}

bool Collator::operator==(const Collator& other) const {
    return collator == other.collator;
}

int Collator::compare(const std::string& lhs, const std::string& rhs) const {
    return collator.compare(lhs, rhs);
}

std::string Collator::resolvedLocale() const {
    return collator.resolvedLocale();
}

} // namespace expression
} // namespace style
} // namespace mbgl