title names |
m style & formatting |
||
(3 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
|}} | |}} | ||
Char to 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 | 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: | === 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: | === * ([[Type:string|string]]) === | ||
The resulting converted string. | The resulting converted string. | ||
== Examples == | == Examples == | ||
<gallery widths=480px heights= | <gallery widths=480px heights=320px> | ||
File:Protoflux_example_Char_To_String.webp| | 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
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
-
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 Concatenate Multi String to form a phrase.