#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); t.FromTo("is", ""); cout << "--- With Default Tokens ---" << endl; // By default, 'is' is a whole word (token) cout << t.Transform("This is a test") << endl; // Clear all default token definitions t.Tokens().Clear(); // Add a new, simple token that matches any single character t.Tokens().Add("."); cout << "" << endl; cout << "--- After Clearing and Adding '.' Token ---" << endl; // Now, 'i' and 's' are matched as separate characters t.FromTo("is", ""); // The rule must be redefined cout << t.Transform("This is a test") << endl; }