NewString

Method

Returns a new uCalc String object

Product: 

Class: 

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.

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

This page last modified on: 

8/21/2026