Warning
uCalc API Preview Release Notice:The uCalc engine has successfully transitioned to modern cross-platform environments.The next phase envolves some structural changes, performance optimizations, and API refinements.The API is subject to breaking changes prior to the stable release. Please evaluate the preview version thoroughly before production use.
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
This page last modified on: