Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
26 lines
569 B
C++
26 lines
569 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <optional>
|
|
|
|
namespace mln {
|
|
namespace platform {
|
|
|
|
class Collator {
|
|
public:
|
|
explicit Collator(bool caseSensitive,
|
|
bool diacriticSensitive,
|
|
const std::optional<std::string>& locale = std::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 mln
|