Public Member Functions | List of all members
StringSubstitution Class Reference

Inherits ScriptObject.

Public Member Functions

 StringSubstitution ()
 
 setValue (String name, String value)
 
String substitute (String text)
 

Detailed Description

String substitution.

var subst = new StringSubstitution();
subst.setValue("description", "CNC Machine");
subst.setValue("tool", 16);
var text = subst.substitute(localize("Please load tool #${tool} on ${description}."));

Constructor & Destructor Documentation

◆ StringSubstitution()

Constructs the string substituion instance.

Member Function Documentation

◆ setValue()

setValue ( String  name,
String  value 
)

Sets the value for the specified key.

Parameters
nameThe name.
valueThe value.

◆ substitute()

String substitute ( String  text)

Returns the substituted text.



Generated by Autodesk, Inc. 05 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.