📝 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!

#BlockWhat it doesDropdown optionsWhat the options mean
1"Hello Clu-Bots"A text string—You can type any message or word here
2Hello join Clu-BotsCombines two texts—Joins words together like LEGO blocks: “HelloClu-Bots”
3Ascii to Char 65Turns a number into a character—65 becomes “A” — great for secret codes or character tricks
4Char to Ascii ATurns a character into its number—“A” becomes 65 — the opposite of the block above
5toString xConverts something into text—Turns numbers, booleans, or other data into readable words
6get length Clu-BotsCounts how many characters are in the text—“Clu-Bots” has 8 characters (including the dash!)
7equals Clu-Bots Clu-BotsCompares two textsequals, startsWith, endsWithequals: exact match
startsWith: begins with
endsWith: finishes with
8Clu-Bots get # 0 to 2Gets part of the text (substring)—Picks characters from position 0 to 2 — like slicing a word
9Clu-Bots get # 0 of Clu-BotsGets one character at a position—Gets the first letter (position 0) — “C” from “Clu-Bots”
10Clu-Bots Random one characterPicks a random character from the text—Great for games or surprises — like picking a random letter
11ASCII encode string Clu-BotsTurns text into encoded formatencode, decodeencode: turns into ASCII
decode: turns back into readable text
12ASCII encode string Clu-BotsChoose encoding typeASCII, gb2312, gbk, utf-8, utf-16, utf-32Different ways to store text — utf-8 is most common
13get Hello_Clu-Bots MidCharacter # 2Gets the middle character at position 2—Picks the third character (starts at 0) — great for puzzles
14Using string Clu-Bots to concatenate the sequence mylist into a stringJoins a list of items into one string—Turns [A, B, C] into “ABC” using “Clu-Bots” as glue
15Hello_Clu-Bots Replace Clu with Clu-blockReplaces part of the text—Changes “Clu” to “Clu-block” — becomes “Clu-block-Bots”
16Clu-Bots A B C SplitSplits text into pieces—Breaks “Clu-Bots” into parts — great for analyzing words
17I love Clu-Bots Strim Both SpaceRemoves spaces from textBoth, Left, RightBoth: trims both ends
Left: trims start
Right: trims end
18format string Random No. % with: random int from 0 to 100Inserts a value into a sentence—Makes “Random No. is 57” — great for messages and scores
19Get string input(1+2*3) Execution resultRuns 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