📝 Text – Your “Textual Communication”

What it is: Blocks that allow you to work with words, phrases, and letters within your program.

What it does: It allows you to work with words, phrases, and letters.

Example: Display the message “Hello World!” on an LCD screen, combine a number with a word (“Temperature: 25°C”), or send text via Bluetooth.

👉 It’s the robot’s written voice, the way it can express itself with words.

 

đź§© Fun Guide to Text Blocks (Clu-blocks Pro)

✍️ Important! Text blocks help your robot read, write, and play with words. You can join words, count letters, change characters, and even format messages. It’s like giving your robot a voice and a keyboard!

# Block What it does Dropdown options What the options mean
1 "Hello Clu-Bots" A text string — You can type any message or word here
2 Hello join Clu-Bots Combines two texts — Joins words together like LEGO blocks: “HelloClu-Bots”
3 Ascii to Char 65 Turns a number into a character — 65 becomes “A” — great for secret codes or character tricks
4 Char to Ascii A Turns a character into its number — “A” becomes 65 — the opposite of the block above
5 toString x Converts something into text — Turns numbers, booleans, or other data into readable words
6 get length Clu-Bots Counts how many characters are in the text — “Clu-Bots” has 8 characters (including the dash!)
7 equals Clu-Bots Clu-Bots Compares two texts equals, startsWith, endsWith equals: exact match
startsWith: begins with
endsWith: finishes with
8 Clu-Bots get # 0 to 2 Gets part of the text (substring) — Picks characters from position 0 to 2 — like slicing a word
9 Clu-Bots get # 0 of Clu-Bots Gets one character at a position — Gets the first letter (position 0) — “C” from “Clu-Bots”
10 Clu-Bots Random one character Picks a random character from the text — Great for games or surprises — like picking a random letter
11 ASCII encode string Clu-Bots Turns text into encoded format encode, decode encode: turns into ASCII
decode: turns back into readable text
12 ASCII encode string Clu-Bots Choose encoding type ASCII, gb2312, gbk, utf-8, utf-16, utf-32 Different ways to store text — utf-8 is most common
13 get Hello_Clu-Bots MidCharacter # 2 Gets the middle character at position 2 — Picks the third character (starts at 0) — great for puzzles
14 Using string Clu-Bots to concatenate the sequence mylist into a string Joins a list of items into one string — Turns [A, B, C] into “ABC” using “Clu-Bots” as glue
15 Hello_Clu-Bots Replace Clu with Clu-block Replaces part of the text — Changes “Clu” to “Clu-block” — becomes “Clu-block-Bots”
16 Clu-Bots A B C Split Splits text into pieces — Breaks “Clu-Bots” into parts — great for analyzing words
17 I love Clu-Bots Strim Both Space Removes spaces from text Both, Left, Right Both: trims both ends
Left: trims start
Right: trims end
18 format string Random No. % with: random int from 0 to 100 Inserts a value into a sentence — Makes “Random No. is 57” — great for messages and scores
19 Get string input(1+2*3) Execution result Runs a math expression inside a string — Calculates the result of the expression and returns it as text

đź§  Quick Tips for Students

  • Use join, replace, and format to build cool messages.
  • Use length, get, and split to explore and break apart words.
  • Use encode/decode for secret messages or advanced text tricks.
  • Use random and substring for games, puzzles, and creative effects.
On this page