Text Blocks
Overview
The text blocks handle and manipulate textual information and allow you to work with strings of characters, words, or sentences. Text blocks include operations like joining text, extracting portions of text, changing letter case (e.g., converting to uppercase or lowercase), and finding the length of text strings.
Text Value
This is the most frequently used text block. It allows you to type text directly into the block or you can leave it empty.
![](https://docs.thunkable.com/~gitbook/image?url=https%3A%2F%2F1223006790-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LAn5scXl2uqUJUOqkJo-84897653%252Fuploads%252FATiZL52dUlvD7SF3DPbh%252Fbasic%2520text%2520block.png%3Falt%3Dmedia%26token%3De6eb4822-c630-45b6-b000-8bad884f8332&width=768&dpr=4&quality=100&sign=baf6c96a&sv=1)
Join
Use this block to join text values together.
Length Of
The "length of" block returns the character length of a given string as a number.
Does Contain
This block checks if a text string contains a substring and returns true or false.
Get Substring
This block returns the substring at the specified start and end position, where 1 is the first letter of the string. Returns an empty string if the length of text provided is less than the starting position specified.
Get Letter
This block returns the character at the specified position, where 1 is the first letter of the string. Returns an empty string if the length of text given is less than the position specified.
Find First/Last Occurrence
This block returns the first or last position of a substring within a string of text, where 1 is the first letter of the string. Returns 0 if the string does not contain the substring.
Replace All
This block locates and replaces all occurrences of a substring within a text string. It returns the reformatted text.
Set Case
This block sets a piece of text to the selected case. It returns the reformatted text.
Trim Spaces
This block trims blank spaces from the left side, right side, or both sides of a string of text. It returns the reformatted text.
Is Empty
This block evaluates whether the text value is empty and returns true if the text value is empty and false if it is not empty.
Newline
The "newline" block is used to add a line break in a piece of text.
Last updated