Alternative parts

ID: 196

				
					using uCalcSoftware;

var uc = new uCalc();
var t = uc.NewTransformer();

t.FromTo("This is a {adjective: simple | small | nice } test",
"The adjective in '{@Self}' is: {adjective}.");

Console.WriteLine(t.Transform("This is a test"));
Console.WriteLine(t.Transform("This is a simple test"));
Console.WriteLine(t.Transform("This is a small test"));
Console.WriteLine(t.Transform("This is a nice test"));
Console.WriteLine(t.Transform("This is a random test"));

				
			
This is a test
The adjective in 'This is a simple test' is: simple.
The adjective in 'This is a small test' is: small.
The adjective in 'This is a nice test' is: nice.
This is a random test
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();

   t.FromTo("This is a {adjective: simple | small | nice } test",
   "The adjective in '{@Self}' is: {adjective}.");

   cout << t.Transform("This is a test") << endl;
   cout << t.Transform("This is a simple test") << endl;
   cout << t.Transform("This is a small test") << endl;
   cout << t.Transform("This is a nice test") << endl;
   cout << t.Transform("This is a random test") << endl;

}
				
			
This is a test
The adjective in 'This is a simple test' is: simple.
The adjective in 'This is a small test' is: small.
The adjective in 'This is a nice test' is: nice.
This is a random test
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      
      t.FromTo("This is a {adjective: simple | small | nice } test",
      "The adjective in '{@Self}' is: {adjective}.")
      
      Console.WriteLine(t.Transform("This is a test"))
      Console.WriteLine(t.Transform("This is a simple test"))
      Console.WriteLine(t.Transform("This is a small test"))
      Console.WriteLine(t.Transform("This is a nice test"))
      Console.WriteLine(t.Transform("This is a random test"))
      
   End Sub
End Module
				
			
This is a test
The adjective in 'This is a simple test' is: simple.
The adjective in 'This is a small test' is: small.
The adjective in 'This is a nice test' is: nice.
This is a random test