|
auto | lowercase () |
| Convert text to lowercase.
|
auto | uppercase () |
| Convert text to uppercase.
|
auto | titlecase () |
| Convert text to title case.
|
auto | trim () |
| Trim leading and trailing whitespace.
|
auto | normalize_whitespace (bool collapse_multiple=true, bool trim_edges=true) |
| Normalize whitespace (collapse multiple spaces, optionally trim)
|
auto | unicode_nfc () |
| Apply Unicode NFC normalization.
|
auto | unicode_nfd () |
| Apply Unicode NFD normalization.
|
auto | unicode_nfkc () |
| Apply Unicode NFKC normalization.
|
auto | unicode_nfkd () |
| Apply Unicode NFKD normalization.
|
auto | tokenize () |
| Tokenize text by whitespace.
|
auto | remove_punctuation () |
| Remove punctuation characters.
|
auto | detect_language () |
| Detect language of text.
|
auto | cleanup () |
| Create a standard text cleanup spell.
|
auto | search_preprocess () |
| Create a search preprocessing spell.
|
template<typename Func> |
auto | custom (std::string name, std::string description, Func &&func) |
| Create a custom spell from a function.
|
template<typename FirstSpell, typename SecondSpell> |
auto | compose (FirstSpell &&first, SecondSpell &&second) |
| Compose two spells into a single spell pipeline.
|
template<typename Spell> |
RuneSequence | cast_spell (const RuneSequence &input, const Spell &spell) |
| Helper function for casting spells on RuneSequence.
|
template<typename FirstSpell, typename SecondSpell>
auto rune_caster::spell::composition::compose |
( |
FirstSpell && | first, |
|
|
SecondSpell && | second ) |
Compose two spells into a single spell pipeline.
This function creates a SpellComposition that applies the first spell, then applies the second spell to the result. Uses C++20 concepts for compile-time validation.
- Template Parameters
-
FirstSpell | The type of the first spell |
SecondSpell | The type of the second spell |
- Parameters
-
first | The first spell to apply |
second | The second spell to apply |
- Returns
- A composed spell that applies both spells in sequence
Definition at line 94 of file spell_composition.hpp.