summaryrefslogtreecommitdiff
path: root/include/mbgl/style/expression/collator.hpp
blob: 51ba426fadbd6ed97ebb8788392a2bb9fc79aa2a (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
25
26
27
#pragma once

#include <mbgl/i18n/collator.hpp>
#include <mbgl/util/optional.hpp>

#include <string>

namespace mbgl {
namespace style {
namespace expression {

class Collator {
public:
    Collator(bool caseSensitive, bool diacriticSensitive, optional<std::string> locale = {});

    bool operator==(const Collator& other) const;

    int compare(const std::string& lhs, const std::string& rhs) const;

    std::string resolvedLocale() const;
private:
    platform::Collator collator;
};

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