A basic example of setting the text, transforming it, and retrieving the result.
ID: 1132
See: Text = [string]
using uCalcSoftware;
var uc = new uCalc();
var t = new uCalc.Transformer();
// 1. Set the initial text
t.Text = "The quick brown fox.";
// 2. Define a rule and transform
t.FromTo("brown", "red");
t.Transform();
// 3. Get the final text
Console.WriteLine(t.Text);
The quick red fox. using uCalcSoftware; var uc = new uCalc(); var t = new uCalc.Transformer(); // 1. Set the initial text t.Text = "The quick brown fox."; // 2. Define a rule and transform t.FromTo("brown", "red"); t.Transform(); // 3. Get the final text Console.WriteLine(t.Text);
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
uCalc::Transformer t;
// 1. Set the initial text
t.Text("The quick brown fox.");
// 2. Define a rule and transform
t.FromTo("brown", "red");
t.Transform();
// 3. Get the final text
cout << t.Text() << endl;
}
The quick red fox. #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; // 1. Set the initial text t.Text("The quick brown fox."); // 2. Define a rule and transform t.FromTo("brown", "red"); t.Transform(); // 3. Get the final text cout << t.Text() << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t As New uCalc.Transformer()
'// 1. Set the initial text
t.Text = "The quick brown fox."
'// 2. Define a rule and transform
t.FromTo("brown", "red")
t.Transform()
'// 3. Get the final text
Console.WriteLine(t.Text)
End Sub
End Module
The quick red fox. Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() '// 1. Set the initial text t.Text = "The quick brown fox." '// 2. Define a rule and transform t.FromTo("brown", "red") t.Transform() '// 3. Get the final text Console.WriteLine(t.Text) End Sub End Module