uCalc API Version: 2.1.3-preview.2 Released: 6/17/2026

Warning

uCalc API Preview Release Notice:The documentation describes the intended behavior of the API. The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.

NewString

Method

Product: 

Fast Math Parser

Class: 

uCalcBase

Returns a new uCalc String object

Syntax

NewString(string)

Parameters

InitialString
string
(Default = "")
String initial value

Return

String

New uCalc string object

Remarks

Mostly for internal use.

Creates a new string instance in the space of the uCalc instance it is being called from. This method is called from the uCalc.String constructor. You may want to use that instead.

The following two C# lines are equivalent:

var MyString = new uCalc.String();var MyString = uCalc.GetDefaultInstance().NewString();

and so are:

var MyString = new uCalc.String("Hello world");var MyString = uCalc.GetDefaultInstance().NewString("Hello world");

as well as:

var MyString = new uCalc.String("Hello world", uc);var MyString = uc.NewString("Hello world"); // Where uc is a defined uCalc instance

Examples