Skip to content

Text

Use the Text blocks to create and perform operations on strings of text.

Example 1

In this example, the first line sets the variable myName to the string Paul. The second line displays a text output as the first letter of myName in a digits display.

Example 2

This example uses an append block that adds text onto an existing text variable. Set the variable myName to "Paul" then append "Stokstad". The full name displays into the fullName Text Output block.

Note

To insert a space between two strings, add a space to the end of the first string or start of the second string.

Example 3

The create text with block joins together text from two or more blocks. In this example, the string "Random di:" joins with the random integer math block, which displays a random number between 1 and 6.

Example 4

In this example the string "pasco" changes to uppercase and displays the letters "P" and "S" on the //code.Node LED array.