m chore: use standard string warning |
style, formatting, bit of a meaning wrap |
||
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
|}} | |}} | ||
Get Character | The '''Get Character''' node retrieves a character from a given string at a given index. | ||
== Inputs == | == Inputs == | ||
=== Str ([[Type: | === Str ([[Type:string|string]]) === | ||
The string to retrieve a character from. | The string to retrieve a character from. | ||
=== Index ([[Type: | === Index ([[Type:int|int]]) === | ||
The 0-indexed character to retrieve from <code>Str</code>. | The 0-indexed character to retrieve from <code>Str</code>. | ||
== Outputs == | == Outputs == | ||
=== * ([[Type: | === * ([[Type:char|char]]) === | ||
The character from <code>Str</code> at index <code>Index</code>. If <code>Index</code> is greater than or equal to the length of <code>Str</code> | The character from <code>Str</code> at index <code>Index</code>. If <code>Index</code> is either negative or greater than or equal to the [[ProtoFlux:String Length|length]] of <code>Str</code>, the output will be a character with value <code>0</code>. | ||
{{Warning:String Outside BMP}} | {{Warning:String Outside BMP}} |
Latest revision as of 20:27, 3 June 2024
Get Character
Characters
The Get Character node retrieves a character from a given string at a given index.
Inputs
Str (string)
The string to retrieve a character from.
Index (int)
The 0-indexed character to retrieve from Str
.
Outputs
* (char)
The character from Str
at index Index
. If Index
is either negative or greater than or equal to the length of Str
, the output will be a character with value 0
.
Examples
-
Get Character being used to retrieve a character from a string, as well as its relation to the Substring node.