morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::table::CodePointCollator Class Referencefinal

The default collator: code-point order, with ASCII and Latin-1 letters case-folded. It does not fold accents. More...

#include <data_source.hpp>

Inheritance diagram for morph::table::CodePointCollator:
morph::table::TextCollator

Public Member Functions

std::string sortKey (std::string_view text) const override
 The case-folded text; its bytes order as its code points.
std::string fold (std::string_view text) const override
 ASCII A-Z and Latin-1 À-Þ (except ×) lowered; every other byte copied as it is.
Public Member Functions inherited from morph::table::TextCollator
virtual std::shared_ptr< TextCollator const > cloneForTask () const
 An instance for one task to use alone.

Detailed Description

The default collator: code-point order, with ASCII and Latin-1 letters case-folded. It does not fold accents.

Stateless and safe to call concurrently.

Definition at line 250 of file data_source.hpp.

Member Function Documentation

◆ sortKey()

std::string morph::table::CodePointCollator::sortKey ( std::string_view text) const
inlinenodiscardoverridevirtual

The case-folded text; its bytes order as its code points.

Parameters
textUTF-8 text.
Returns
The collation key.

Implements morph::table::TextCollator.

Definition at line 255 of file data_source.hpp.

◆ fold()

std::string morph::table::CodePointCollator::fold ( std::string_view text) const
inlinenodiscardoverridevirtual

ASCII A-Z and Latin-1 À-Þ (except ×) lowered; every other byte copied as it is.

Parameters
textUTF-8 text.
Returns
The folded text.

Implements morph::table::TextCollator.

Definition at line 261 of file data_source.hpp.


The documentation for this class was generated from the following file: