Basic data cleaning by trimming whitespace and changing the case of a single key-value pair.

ID: 1370

				
					using uCalcSoftware;

var uc = new uCalc();
var t = uc.NewTransformer();
// Rule to find 'status', capture its value, trim whitespace, and convert to uppercase.
t.FromTo("status = {val}", "Status: {@Eval: UCase(val)}");

var input = "status=  active  ";
Console.WriteLine(t.Transform(input));
				
			
Status: ACTIVE
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   // Rule to find 'status', capture its value, trim whitespace, and convert to uppercase.
   t.FromTo("status = {val}", "Status: {@Eval: UCase(val)}");

   auto input = "status=  active  ";
   cout << t.Transform(input) << endl;
}
				
			
Status: ACTIVE
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      '// Rule to find 'status', capture its value, trim whitespace, and convert to uppercase.
      t.FromTo("status = {val}", "Status: {@Eval: UCase(val)}")
      
      Dim input = "status=  active  "
      Console.WriteLine(t.Transform(input))
   End Sub
End Module
				
			
Status: ACTIVE