uCalc API Version: 5.7.0-preview.1 Released: 7/30/2026
Warning
uCalc API Preview Release Notice:This preview documentation describes the intended behavior of the API. It is not fully accurate or complete.The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.Use of the preview version in your production code is not recommended.
Product:
Class:
Replaces occurences of a pattern with something else
uCalc String object
Replaces occurrences of a pattern with something else.
ID: 227
using uCalcSoftware;
var uc = new uCalc();
uCalc.String text = "This is foo 1, foo 2, Foo 3, foo 4";
text.After("1").Before("3").Replace("foo", "bar"); // 'text' is now modified
Console.WriteLine(text);
This is foo 1, bar 2, bar 3, foo 4 using uCalcSoftware; var uc = new uCalc(); uCalc.String text = "This is foo 1, foo 2, Foo 3, foo 4"; text.After("1").Before("3").Replace("foo", "bar"); // 'text' is now modified Console.WriteLine(text);
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
uCalc::String text = "This is foo 1, foo 2, Foo 3, foo 4";
text.After("1").Before("3").Replace("foo", "bar"); // 'text' is now modified
cout << text << endl;
}
This is foo 1, bar 2, bar 3, foo 4 #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::String text = "This is foo 1, foo 2, Foo 3, foo 4"; text.After("1").Before("3").Replace("foo", "bar"); // 'text' is now modified cout << text << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim text As uCalc.String = "This is foo 1, foo 2, Foo 3, foo 4"
text.After("1").Before("3").Replace("foo", "bar") '// 'text' is now modified
Console.WriteLine(text)
End Sub
End Module
This is foo 1, bar 2, bar 3, foo 4 Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim text As uCalc.String = "This is foo 1, foo 2, Foo 3, foo 4" text.After("1").Before("3").Replace("foo", "bar") '// 'text' is now modified Console.WriteLine(text) End Sub End Module