Warning
uCalc API Preview Release Notice:The uCalc engine has successfully transitioned to modern cross-platform environments.The next phase envolves some structural changes, performance optimizations, and API refinements.The API is subject to breaking changes prior to the stable release. Please evaluate the preview version thoroughly before production use.
This retrieves the string value associated with a uCalc String object. If no argument is passed then the entire string is returned. Use Str(n) when you just want the string representation of a match. Use Match(n) when you want uCalc String Object that you can manipulate further.
This assigns a new string to the uCalc String object.
The Text property syntax is optional. It's presence can be infered
if s is a uCalc.String, you can do s.Text = "abc"; result = s.Text can be written as s = "abc"; result = s.
ID: 154
using uCalcSoftware;
var uc = new uCalc();
var t = uc.NewTransformer();
t.Text = "if (x > 3) y = x * 2; else if(x == 5) y = x - 1;";
t.FromTo("1", "100");
t.Transform();
var Pattern = "if ({cond})";
Console.WriteLine(new uCalc.String(t).After(Pattern).Text);
Console.WriteLine(new uCalc.String(t).After(Pattern).After(Pattern));
var s = new uCalc.String();
s = "This is a test";
Console.WriteLine(new uCalc.Transformer(s).Text);
y = x * 2; else if(x == 5) y = x - 100;
y = x - 100;
This is a test using uCalcSoftware; var uc = new uCalc(); var t = uc.NewTransformer(); t.Text = "if (x > 3) y = x * 2; else if(x == 5) y = x - 1;"; t.FromTo("1", "100"); t.Transform(); var Pattern = "if ({cond})"; Console.WriteLine(new uCalc.String(t).After(Pattern).Text); Console.WriteLine(new uCalc.String(t).After(Pattern).After(Pattern)); var s = new uCalc.String(); s = "This is a test"; Console.WriteLine(new uCalc.Transformer(s).Text);
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
auto t = uc.NewTransformer();
t.Text("if (x > 3) y = x * 2; else if(x == 5) y = x - 1;");
t.FromTo("1", "100");
t.Transform();
auto Pattern = "if ({cond})";
cout << uCalc::String(t).After(Pattern).Text() << endl;
cout << uCalc::String(t).After(Pattern).After(Pattern) << endl;
uCalc::String s;
s = "This is a test";
cout << uCalc::Transformer(s).Text() << endl;
}
y = x * 2; else if(x == 5) y = x - 100;
y = x - 100;
This is a test #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); t.Text("if (x > 3) y = x * 2; else if(x == 5) y = x - 1;"); t.FromTo("1", "100"); t.Transform(); auto Pattern = "if ({cond})"; cout << uCalc::String(t).After(Pattern).Text() << endl; cout << uCalc::String(t).After(Pattern).After(Pattern) << endl; uCalc::String s; s = "This is a test"; cout << uCalc::Transformer(s).Text() << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t = uc.NewTransformer()
t.Text = "if (x > 3) y = x * 2; else if(x == 5) y = x - 1;"
t.FromTo("1", "100")
t.Transform()
Dim Pattern = "if ({cond})"
Console.WriteLine(new uCalc.String(t).After(Pattern).Text)
Console.WriteLine(new uCalc.String(t).After(Pattern).After(Pattern))
Dim s As New uCalc.String()
s = "This is a test"
Console.WriteLine(new uCalc.Transformer(s).Text)
End Sub
End Module
y = x * 2; else if(x == 5) y = x - 100;
y = x - 100;
This is a test Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() t.Text = "if (x > 3) y = x * 2; else if(x == 5) y = x - 1;" t.FromTo("1", "100") t.Transform() Dim Pattern = "if ({cond})" Console.WriteLine(new uCalc.String(t).After(Pattern).Text) Console.WriteLine(new uCalc.String(t).After(Pattern).After(Pattern)) Dim s As New uCalc.String() s = "This is a test" Console.WriteLine(new uCalc.Transformer(s).Text) End Sub End Module
This page last modified on: