ProtoFlux:Format String

From Resonite Wiki
Revision as of 06:52, 20 January 2024 by ProbablePrime (talk | contribs) (ProbablePrime moved page Format String (ProtoFlux) to ProtoFlux:Format String: Creating protoflux Namespace)
Format
Format
*
FormatProvider
Parameters
+
-
Formatting

This node simply calls the C# String.Format function using the provided parameters. It allows you to take a string like "I am a {0} who likes to do {1} while {2}" And populate {1}, {2}, and {3} with values. If you plug any value into the list of inputs for the Parameters, it will auto add a cast node into an object.

For example using the string "The number {0} is on the {2} hand and the fact it's enabled is {3}." for Format. Then Plugging in a float (1.25) for the first input, Then a Chirality (Left) to the second, then a Boolean (True) will result in the output "The number 1.25 is on the Left hand and the fact it's enabled is True."

Inputs

Format (String)

A composite format string.

FormatProvider (IFormatProvider)

An object that supplies culture-specific formatting information.

Nodes that output this type can be found in Strings/Localization

Outputs

* (String)

The formatted string.