uCalc Documentation & Knowledge Base
Explore the uCalc SDK, learn how to parse and evaluate math expressions, parse and transform text, and perform string operations. Browse over 600 interactive examples online.
{$code}
uCalc Overview
Introduction to the fast math parser, transformer, and string library.
Tutorials & Guides
Take a guided tour of the entire uCalc SDK.
FAQ & Troubleshooting
Check here first before submitting a question via email.
Online Interactive Examples
600+ Interactive examples that you can try right here on this site.
Hands-on Projects
These are useful starter projects that you can learn from and build on to create real projects.
Three core SDK components performing their primary functions independently.
ID: 1358
See: uCalc SDK
using uCalcSoftware;
var uc = new uCalc();
// 1. Expression Parser: Evaluate a simple math or string expression
Console.WriteLine($"Parser Result: {uc.Eval("(100 - 50) / 2")}");
Console.WriteLine($"Parser Result (string): {uc.EvalStr("'Hello ' + 'World'")}");
// 2. Transformer: Perform a basic find-and-replace
var t = new uCalc.Transformer();
t.FromTo("Hello", "Hi");
t.FromTo("World", "Planet");
t.SkipOver("/* {comment} */");
Console.WriteLine($"Transformer Result: {t.Transform("Hello World /* Was Hello World */")}");
// 3. String Library: Use a fluent, chainable operation
uCalc.String s = "The value is: important";
s.After(":").ToUpper();
Console.WriteLine($"String Library Result: {s}");
Parser Result: 25
Parser Result (string): Hello World
Transformer Result: Hi Planet /* Was Hello World */
String Library Result: The value is: IMPORTANT using uCalcSoftware; var uc = new uCalc(); // 1. Expression Parser: Evaluate a simple math or string expression Console.WriteLine($"Parser Result: {uc.Eval("(100 - 50) / 2")}"); Console.WriteLine($"Parser Result (string): {uc.EvalStr("'Hello ' + 'World'")}"); // 2. Transformer: Perform a basic find-and-replace var t = new uCalc.Transformer(); t.FromTo("Hello", "Hi"); t.FromTo("World", "Planet"); t.SkipOver("/* {comment} */"); Console.WriteLine($"Transformer Result: {t.Transform("Hello World /* Was Hello World */")}"); // 3. String Library: Use a fluent, chainable operation uCalc.String s = "The value is: important"; s.After(":").ToUpper(); Console.WriteLine($"String Library Result: {s}");
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
// 1. Expression Parser: Evaluate a simple math or string expression
cout << "Parser Result: " << uc.Eval("(100 - 50) / 2") << endl;
cout << "Parser Result (string): " << uc.EvalStr("'Hello ' + 'World'") << endl;
// 2. Transformer: Perform a basic find-and-replace
uCalc::Transformer t;
t.FromTo("Hello", "Hi");
t.FromTo("World", "Planet");
t.SkipOver("/* {comment} */");
cout << "Transformer Result: " << t.Transform("Hello World /* Was Hello World */") << endl;
// 3. String Library: Use a fluent, chainable operation
uCalc::String s = "The value is: important";
s.After(":").ToUpper();
cout << "String Library Result: " << s << endl;
}
Parser Result: 25
Parser Result (string): Hello World
Transformer Result: Hi Planet /* Was Hello World */
String Library Result: The value is: IMPORTANT #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // 1. Expression Parser: Evaluate a simple math or string expression cout << "Parser Result: " << uc.Eval("(100 - 50) / 2") << endl; cout << "Parser Result (string): " << uc.EvalStr("'Hello ' + 'World'") << endl; // 2. Transformer: Perform a basic find-and-replace uCalc::Transformer t; t.FromTo("Hello", "Hi"); t.FromTo("World", "Planet"); t.SkipOver("/* {comment} */"); cout << "Transformer Result: " << t.Transform("Hello World /* Was Hello World */") << endl; // 3. String Library: Use a fluent, chainable operation uCalc::String s = "The value is: important"; s.After(":").ToUpper(); cout << "String Library Result: " << s << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// 1. Expression Parser: Evaluate a simple math or string expression
Console.WriteLine($"Parser Result: {uc.Eval("(100 - 50) / 2")}")
Console.WriteLine($"Parser Result (string): {uc.EvalStr("'Hello ' + 'World'")}")
'// 2. Transformer: Perform a basic find-and-replace
Dim t As New uCalc.Transformer()
t.FromTo("Hello", "Hi")
t.FromTo("World", "Planet")
t.SkipOver("/* {comment} */")
Console.WriteLine($"Transformer Result: {t.Transform("Hello World /* Was Hello World */")}")
'// 3. String Library: Use a fluent, chainable operation
Dim s As uCalc.String = "The value is: important"
s.After(":").ToUpper()
Console.WriteLine($"String Library Result: {s}")
End Sub
End Module
Parser Result: 25
Parser Result (string): Hello World
Transformer Result: Hi Planet /* Was Hello World */
String Library Result: The value is: IMPORTANT Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// 1. Expression Parser: Evaluate a simple math or string expression Console.WriteLine($"Parser Result: {uc.Eval("(100 - 50) / 2")}") Console.WriteLine($"Parser Result (string): {uc.EvalStr("'Hello ' + 'World'")}") '// 2. Transformer: Perform a basic find-and-replace Dim t As New uCalc.Transformer() t.FromTo("Hello", "Hi") t.FromTo("World", "Planet") t.SkipOver("/* {comment} */") Console.WriteLine($"Transformer Result: {t.Transform("Hello World /* Was Hello World */")}") '// 3. String Library: Use a fluent, chainable operation Dim s As uCalc.String = "The value is: important" s.After(":").ToUpper() Console.WriteLine($"String Library Result: {s}") End Sub End Module