Allow Collators to have their language specified, and specify it for tests.
[dcpomatic.git] / src / lib / collator.h
index 3762f240013fe83847ca212f05d04c921304e8eb..3cbb407487b7dd7fa0a18406456fc9f43baa7f64 100644 (file)
@@ -32,13 +32,14 @@ struct UCollator;
 class Collator
 {
 public:
-       Collator();
+       Collator(char const* locale = nullptr);
        ~Collator();
 
        Collator(Collator const &) = delete;
        Collator& operator=(Collator const&) = delete;
 
-       int compare(std::string const& utf8_a, std::string const& utf8_b);
+       int compare(std::string const& utf8_a, std::string const& utf8_b) const;
+       bool find(std::string pattern, std::string text) const;
 
 private:
        UCollator* _collator = nullptr;