Token Remove
ID: 169
using uCalcSoftware;
var uc = new uCalc();
// This example removes the single quote pattern from the list
var t = uc.NewTransformer();
var txt = "This is a test, 'This is a test'";
t.FromTo("{token:1}", "<{@Self}>");
Console.WriteLine(t.Transform(txt).Text);
// Now the ' character will no longer be special
// (see the Name() example for list of token names
t.Tokens.Remove(t.Tokens["_token_string_singlequoted"]);
Console.WriteLine(t.Transform(txt).Text);
<This> <is> <a> <test><,> <'This is a test'>
<This> <is> <a> <test><,> <'><This> <is> <a> <test><'> using uCalcSoftware; var uc = new uCalc(); // This example removes the single quote pattern from the list var t = uc.NewTransformer(); var txt = "This is a test, 'This is a test'"; t.FromTo("{token:1}", "<{@Self}>"); Console.WriteLine(t.Transform(txt).Text); // Now the ' character will no longer be special // (see the Name() example for list of token names t.Tokens.Remove(t.Tokens["_token_string_singlequoted"]); Console.WriteLine(t.Transform(txt).Text);
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
// This example removes the single quote pattern from the list
auto t = uc.NewTransformer();
auto txt = "This is a test, 'This is a test'";
t.FromTo("{token:1}", "<{@Self}>");
cout << t.Transform(txt).Text() << endl;
// Now the ' character will no longer be special
// (see the Name() example for list of token names
t.Tokens().Remove(t.Tokens()["_token_string_singlequoted"]);
cout << t.Transform(txt).Text() << endl;
}
<This> <is> <a> <test><,> <'This is a test'>
<This> <is> <a> <test><,> <'><This> <is> <a> <test><'> #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // This example removes the single quote pattern from the list auto t = uc.NewTransformer(); auto txt = "This is a test, 'This is a test'"; t.FromTo("{token:1}", "<{@Self}>"); cout << t.Transform(txt).Text() << endl; // Now the ' character will no longer be special // (see the Name() example for list of token names t.Tokens().Remove(t.Tokens()["_token_string_singlequoted"]); cout << t.Transform(txt).Text() << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// This example removes the single quote pattern from the list
Dim t = uc.NewTransformer()
Dim txt = "This is a test, 'This is a test'"
t.FromTo("{token:1}", "<{@Self}>")
Console.WriteLine(t.Transform(txt).Text)
'// Now the ' character will no longer be special
'// (see the Name() example for list of token names
t.Tokens.Remove(t.Tokens("_token_string_singlequoted"))
Console.WriteLine(t.Transform(txt).Text)
End Sub
End Module
<This> <is> <a> <test><,> <'This is a test'>
<This> <is> <a> <test><,> <'><This> <is> <a> <test><'> Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// This example removes the single quote pattern from the list Dim t = uc.NewTransformer() Dim txt = "This is a test, 'This is a test'" t.FromTo("{token:1}", "<{@Self}>") Console.WriteLine(t.Transform(txt).Text) '// Now the ' character will no longer be special '// (see the Name() example for list of token names t.Tokens.Remove(t.Tokens("_token_string_singlequoted")) Console.WriteLine(t.Transform(txt).Text) End Sub End Module