A simple word replacement to demonstrate the basic find-and-replace capability.
ID: 1263
See: uCalc Transformer
using uCalcSoftware;
var uc = new uCalc();
using (var t = new uCalc.Transformer()) {
t.FromTo("red", "blue");
Console.WriteLine(t.Transform("The red car and the red house."));
};
The blue car and the blue house. using uCalcSoftware; var uc = new uCalc(); using (var t = new uCalc.Transformer()) { t.FromTo("red", "blue"); Console.WriteLine(t.Transform("The red car and the red house.")); };
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
{
uCalc::Transformer t;
t.Owned(); // Causes t to be released when it goes out of scope
t.FromTo("red", "blue");
cout << t.Transform("The red car and the red house.") << endl;
};
}
The blue car and the blue house. #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; { uCalc::Transformer t; t.Owned(); // Causes t to be released when it goes out of scope t.FromTo("red", "blue"); cout << t.Transform("The red car and the red house.") << endl; }; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Using t As New uCalc.Transformer()
t.FromTo("red", "blue")
Console.WriteLine(t.Transform("The red car and the red house."))
End Using
End Sub
End Module
The blue car and the blue house. Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Using t As New uCalc.Transformer() t.FromTo("red", "blue") Console.WriteLine(t.Transform("The red car and the red house.")) End Using End Sub End Module