Public Member Functions | List of all members
Template Class Reference

Public Member Functions

 Template (String text)
 
String substitute (Map map)
 

Detailed Description

A string template.

var template = new Template("My first name is ${firstName} and my last name is ${lastName}.");
var str = template.substitute({firstName:"John", lastName:"Doe"});
// str is "My first name is John and my last name is Doe."

Constructor & Destructor Documentation

◆ Template()

Template ( String  text)

Constructs a string template.

Parameters
textThe templace text.

Member Function Documentation

◆ substitute()

String substitute ( Map  map)

Returns the substitute text.

Parameters
mapThe variables.


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