QuoteSensitive

ID: 144

				
					using uCalcSoftware;

var uc = new uCalc();
var t = uc.NewTransformer().SetText("Test1 'a b c' a b c Test2 'a b c' a b c");

var Test1 = t.FromTo("Test1 {txt} b", "[{txt}]"); // defaults to QuoteSensitive = true
var Test2 = t.FromTo("Test2 {txt} b", "({txt})").SetQuoteSensitive(false);
t.Transform();

Console.WriteLine($"Test1 QuoteSensitive = {Test1.QuoteSensitive}");
Console.WriteLine($"Test2 QuoteSensitive = {Test2.QuoteSensitive}");

Console.WriteLine(t);
				
			
Test1 QuoteSensitive = True
Test2 QuoteSensitive = False
['a b c' a] c ('a) c' a b c
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

#define tf(IsTrue) ((IsTrue) ? "True" : "False")

int main() {
   uCalc uc;
   auto t = uc.NewTransformer().SetText("Test1 'a b c' a b c Test2 'a b c' a b c");

   auto Test1 = t.FromTo("Test1 {txt} b", "[{txt}]"); // defaults to QuoteSensitive = true
   auto Test2 = t.FromTo("Test2 {txt} b", "({txt})").SetQuoteSensitive(false);
   t.Transform();

   cout << "Test1 QuoteSensitive = " << tf(Test1.QuoteSensitive()) << endl;
   cout << "Test2 QuoteSensitive = " << tf(Test2.QuoteSensitive()) << endl;

   cout << t << endl;
}
				
			
Test1 QuoteSensitive = True
Test2 QuoteSensitive = False
['a b c' a] c ('a) c' a b c
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer().SetText("Test1 'a b c' a b c Test2 'a b c' a b c")
      
      Dim Test1 = t.FromTo("Test1 {txt} b", "[{txt}]") '// defaults to QuoteSensitive = true
      Dim Test2 = t.FromTo("Test2 {txt} b", "({txt})").SetQuoteSensitive(false)
      t.Transform()
      
      Console.WriteLine($"Test1 QuoteSensitive = {Test1.QuoteSensitive}")
      Console.WriteLine($"Test2 QuoteSensitive = {Test2.QuoteSensitive}")
      
      Console.WriteLine(t)
   End Sub
End Module
				
			
Test1 QuoteSensitive = True
Test2 QuoteSensitive = False
['a b c' a] c ('a) c' a b c