192template<
typename Func>
210template<
typename Func>
211auto custom(std::string name, std::string description, Func&& func) {
214 std::move(description),
215 std::forward<Func>(func)
Create a custom spell from a lambda function.
CustomSpell(std::string name, std::string desc, Func func)
Search preprocessing: cleanup + remove punctuation + unicode NFC.
Standard text cleanup: normalize whitespace + trim + lowercase.
Case conversion spell using C++20 concepts.
@ Upper
Convert to uppercase.
@ Lower
Convert to lowercase.
@ Title
Convert to titlecase (first letter of each word)
Trim leading and trailing whitespace.
Unicode normalization spell using C++20 concepts.
Normalize whitespace characters using C++20 concepts.
Simple whitespace tokenizer Splits input RuneSequence into tokens separated by Unicode whitespace.
Remove punctuation characters using C++20 concepts.
Language detection spell using C++20 concepts.
std::string name() const override
Get the spell's name.
spell_extensible(std::string name, std::string desc)
auto unicode_nfkd()
Apply Unicode NFKD normalization.
auto tokenize()
Tokenize text by whitespace.
auto cleanup()
Create a standard text cleanup spell.
auto titlecase()
Convert text to title case.
auto uppercase()
Convert text to uppercase.
auto search_preprocess()
Create a search preprocessing spell.
auto remove_punctuation()
Remove punctuation characters.
auto custom(std::string name, std::string description, Func &&func)
Create a custom spell from a function.
auto unicode_nfc()
Apply Unicode NFC normalization.
auto unicode_nfd()
Apply Unicode NFD normalization.
auto detect_language()
Detect language of text.
auto unicode_nfkc()
Apply Unicode NFKC normalization.
auto normalize_whitespace(bool collapse_multiple=true, bool trim_edges=true)
Normalize whitespace (collapse multiple spaces, optionally trim)
auto trim()
Trim leading and trailing whitespace.
auto lowercase()
Convert text to lowercase.
RuneString RuneSequence
Backward compatibility alias for RuneString.
constexpr auto make_caster(T &&data) noexcept -> caster< std::decay_t< T > >
Factory function to create a caster (C++20 template argument deduction)