summaryrefslogtreecommitdiff
path: root/include/mbgl/i18n/collator.hpp
blob: 9db1f804aa40be3bb86be2415744d251351495af (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
#pragma once

#include <mbgl/util/optional.hpp>

#include <memory>
#include <string>

namespace mbgl {
namespace platform {

class Collator {
public:
    explicit Collator(bool caseSensitive, bool diacriticSensitive, optional<std::string> locale = nullopt);
    int compare(const std::string& lhs, const std::string& rhs) const;
    std::string resolvedLocale() const;
    bool operator==(const Collator& other) const;

private:
    class Impl;
    std::shared_ptr<Impl> impl;
};

} // namespace platform
} // namespace mbgl