/* * Copyright (c) 2022, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace JS::Intl { class CollatorCompareFunction : public NativeFunction { JS_OBJECT(CollatorCompareFunction, NativeFunction); public: static CollatorCompareFunction* create(GlobalObject&, Collator&); CollatorCompareFunction(Realm&, Collator&); virtual void initialize(Realm&) override; virtual ~CollatorCompareFunction() override = default; virtual ThrowCompletionOr call() override; private: virtual void visit_edges(Visitor&) override; Collator& m_collator; // [[Collator]] }; double compare_strings(Collator&, Utf8View const& x, Utf8View const& y); }