To_uCalcString

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
				
					#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;
}
				
			
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
				
			
y = x * 2; else if(x == 5) y = x - 100;
 y = x - 100;
This is a test