MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ text_successor()

RewriteOperator::Successor MayaFlux::Nodes::Network::RewriteOperator::text_successor ( std::string_view text)
staticnodiscard

A successor that emits the text's characters as parameterless symbols.

Definition at line 91 of file RewriteOperator.cpp.

92{
93 return [symbols = symbols_from_text(text)](const Symbol&, Environment, const EmitSymbol& emit) {
94 for (const auto& symbol : symbols) {
95 if (!emit(symbol)) {
96 return;
97 }
98 }
99 };
100}
std::function< bool(Symbol)> EmitSymbol
Append a symbol; false on a bound violation.
static std::vector< Symbol > symbols_from_text(std::string_view text)
One parameterless symbol per character, each character being its own id.
What a replacement sees: the caller's inputs, the word with the symbol's position in it,...

References symbols_from_text(), and text_successor().

Referenced by replace(), and text_successor().

Here is the call graph for this function:
Here is the caller graph for this function: