ProtoFlux:Char To String: Difference between revisions

From Resonite Wiki
title names
m style & formatting
 
(3 intermediate revisions by the same user not shown)
Line 12: Line 12:
|}}
|}}


Char to String is a ProtoFlux node that acts as a cast to turn a [[Type:Char|character]] into a [[Type:String|string]].
The '''Char to String''' node acts as a cast to turn a [[Type:Char|character]] into a [[Type:String|string]].


This is very useful when working with individual characters and need to put them with strings or put them into text.
This is very useful when working with individual characters and one needs to use string operations, such as concatenation, with said characters.


== Inputs ==
== Inputs ==


=== Input ([[Type:Char|Char]]) ===
=== Input ([[Type:char|char]]) ===


The character to turn into a string.
The character to turn into a string.
Line 24: Line 24:
== Outputs ==
== Outputs ==


=== * ([[Type:String|String]]) ===
=== * ([[Type:string|string]]) ===


The resulting converted string.
The resulting converted string.


== Examples ==
== Examples ==
<gallery widths=480px heights=480px>
<gallery widths=480px heights=320px>
File:Protoflux_example_Char_To_String.webp|example of using Char To String in some ProtoFlux code.
File:Protoflux_example_Char_To_String.webp|alt=The characters "7" and a space are plugged in to a Char to String node. On the bottom, a string input of "Drunken Sailors" in present. All 3 strings are plugged in to a Concatenate Multi String, where hte output is "7 Drunken Sailors"|Example of using Char To String in some ProtoFlux code, wherein the characters "7" and a space are cast to string, then combined in a [[ProtoFlux:Concatenate_Multi_String|Concatenate Multi String]] to form a phrase.
</gallery>
</gallery>


[[Category:ProtoFlux:Strings:Characters]]
[[Category:ProtoFlux:Strings:Characters]]

Latest revision as of 19:59, 3 June 2024

Char To String
Input
*
Characters

The Char to String node acts as a cast to turn a character into a string.

This is very useful when working with individual characters and one needs to use string operations, such as concatenation, with said characters.

Inputs

Input (char)

The character to turn into a string.

Outputs

* (string)

The resulting converted string.

Examples