For the complete documentation index, see llms.txt. This page is also available as Markdown.

StringBind

This BIF allows you to bind a string with placeholders to a set of values.

Each placeholder is defined as {@code ${placeholder-name}} and can be used anywhere and multiple times in the string.

Method Signature

StringBind(string=[string], placeholders=[structloose])

Arguments

Argument
Type
Required
Description
Default

string

string

true

The string to bind with placeholders

placeholders

struct

true

A struct containing the placeholder values

Examples

Bind values into a string template

result = stringBind( "Hello, {name}! You have {count} messages.", { name: "Luis", count: 5 } );
writeOutput( result );

Result: Hello, Luis! You have 5 messages.

Using the member function

Result: Welcome, World!

Missing keys remain as placeholders

Result: Hello, {name}!

Last updated

Was this helpful?