Skip to content

← programming package

StringFormat

Format a string with placeholders.

This node accepts a string, as well as multiple optional values. The string may contain placeholder symbols, that will be substituted by the respective values. This is similar to the printf() functionality in C and similar programming languages, and the same syntax can be used. More Info... Version 1.0.0

Ports/Properties

result

Formatted result string.

verbose name
Result
default value
None
port type
DataPort
value type
str (can be None)
data direction
OUT

string

Format string with placeholders. The placeholders can be of the form %s where we want to splice in a string, %i if we expect an integer value, %f for float values, and so forth.

verbose name
String Template
default value
port type
StringPort
value type
str (can be None)

placeholder_style

Type of syntax to accept for placeholders. printf is the %s style syntax known from the C programming language, and format is Python's new {0} style placeholder syntax. For format, note that the {k} expressions are being indexed from 0, while the inputs are indexed from 1.

verbose name
Placeholder Style
default value
printf
port type
EnumPort
value type
str (can be None)

value1

Value 1. This value, if any, will be substituted into the 1st placeholder slot.

verbose name
Value1
default value
None
port type
Port
value type
object (can be None)

value2

Value 2. This value, if any, will be substituted into the 2nd placeholder slot.

verbose name
Value2
default value
None
port type
Port
value type
object (can be None)

value3

Value 3. This value, if any, will be substituted into the 3rd placeholder slot.

verbose name
Value3
default value
None
port type
Port
value type
object (can be None)

value4

Value 4. This value, if any, will be substituted into the 4th placeholder slot.

verbose name
Value4
default value
None
port type
Port
value type
object (can be None)

value5

Value 5. This value, if any, will be substituted into the 5th placeholder slot.

verbose name
Value5
default value
None
port type
Port
value type
object (can be None)

value6

Value 6. This value, if any, will be substituted into the 6th placeholder slot.

verbose name
Value6
default value
None
port type
Port
value type
object (can be None)

value7

Value 7. This value, if any, will be substituted into the 7th placeholder slot.

verbose name
Value7
default value
None
port type
Port
value type
object (can be None)

value8

Value 8. This value, if any, will be substituted into the 8th placeholder slot.

verbose name
Value8
default value
None
port type
Port
value type
object (can be None)

value9

Value 9. This value, if any, will be substituted into the 9th placeholder slot.

verbose name
Value9
default value
None
port type
Port
value type
object (can be None)

value10

Value 10. This value, if any, will be substituted into the 10th placeholder slot.

verbose name
Value10
default value
None
port type
Port
value type
object (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)