Documentation
  • Introduction
  • Components
    • User Interface
      • Button
      • Checkbox
      • Date Picker
      • Floating Button
      • Image
      • Label
      • List Picker
      • List View
      • List View Image and Text
      • Notifier
      • Radio Button
      • Rating Bar
      • Slider
      • Surface View
      • Spinner
      • Switch
      • TextBox
      • Time Picker
      • Web Viewer
    • Layout
      • Horizontal Arrangement
      • Horizontal Scroll Arrangement
      • Space
      • Table Arrangement
      • Vertical Arrangement
      • Vertical Scroll Arrangement
    • Media
      • Audio Picker
      • Camcorder
      • Camera
      • Image Picker
      • Metadata
      • OCR
      • Player
      • QR Code
      • Sound
      • Sound Recorder
      • Speech Recognizer
      • Text To Speech
      • Video Player
      • Yandex Translate
    • Drawing and Animation
      • Ball
      • Canvas
      • Image Editor
      • Image Sprite
    • Sensors
      • Accelerometer
      • Barcode Scanner
      • Clock
      • Finger Print
      • Gravity Sensor
      • Gyroscope Sensor
      • Light Sensor
      • Location Sensor
      • Magnetic Field Sensor
      • NearField
      • Orientation Sensor
      • Pedometer
      • Pressure Sensor
      • Proximity Sensor
      • Sound Sensor
      • Temperature Sensor
    • Social
      • Contact Picker
      • Email Picker
      • Google Account Picker
      • Phone Call
      • Phone Number Picker
      • Sharing
      • Texting
      • Twitter
    • Storage
      • File
      • Firebase DB
      • Fusiontables Control
      • SQLite
      • Tiny DB
      • Tiny Web DB
    • Connectivity
      • Activity Starter
      • Bluetooth Admin
      • Bluetooth Client
      • Bluetooth Server
      • Download
      • Network
      • Web
      • WiFi
    • Google
      • Google Account Picker
      • Google Maps
      • Google Shortlink
    • LEGO Mindstorms
      • NXT Drive
      • NXT Color Sensor
      • NXT Light Sensor
      • NXT Sound Sensor
      • NXT Touch Sensor
      • NXT Ultrasonic Sensor
      • NXT Direct Commands
      • EV3 Motors
      • EV3 Color Sensor
      • EV3 Gyro Sensor
      • EV3 Touch Sensor
      • EV3 Ultrasonic Sensor
      • EV3 Sound
      • EV3 UI
      • EV3 Commands
    • Monetization
      • AdMob Interstitial
      • AdMob Banner
      • AdMob Rewarded Video
      • Billing
      • Leadbolt
    • Device
      • Audio
      • Device Tools
      • Wallpaper
      • Package
      • Screenshot
    • Experimental
      • Push Notifications
      • Cloud DB
      • Notification
  • Blocks
    • Control
    • Logic
    • Math
    • Text
    • Lists
    • Colors
    • Variables
    • Procedures
    • Screen
    • Any Component
  • Testing
    • Live Development
      • Via WiFi
      • Via USB
    • Makeroid Companion
  • Extensions
    • List of Extensions
    • Creating Extensions
  • Other
    • Backpack
    • Release Notes
      • Andromeda
      • Beta Versions
    • Resources
      • Concept Cards
    • Terms of Service
Powered by GitBook
On this page
  • " "
  • join
  • length
  • is empty
  • compare texts <> =
  • trim
  • upcase
  • downcase
  • starts at
  • contains
  • split at first
  • split at first of any
  • split
  • split at any
  • split at spaces
  • segment
  • replace all
  1. Blocks

Text

PreviousMathNextLists

Last updated 7 years ago

" "

Contains a text string.

This string can contain any characters (letters, numbers, or other special characters). On Makeroid, it will be considered a Text object.

join

Appends all of the inputs to make a single string. If no inputs, returns an empty string.

length

Returns the number of characters including spaces in the string. This is the length of the given text string.

is empty

Returns whether or not the string contains any characters (including spaces). When the string length is 0, returns true otherwise it returns false.

compare texts <> =

Returns whether or not the first string is lexicographically <, >, or = the second string depending on which dropdown is selected.

A string a considered lexicographically greater than another if it is alphabetically greater than the other string. Essentially, it would come after it in the dictionary. All uppercase letters are considered smaller or to occur before lowercase letters. cat would be > Cat.

trim

Removes any spaces leading or trailing the input string and returns the result.

upcase

Returns a copy of its text string argument converted to all upper case

downcase

Returns a copy of its text string argument converted to all lower case

starts at

Returns the character position where the first character of piece first appears in text, or 0 if not present. For example, the location of ana in havana banana is 4.

contains

Returns true if piece appears in text; otherwise, returns false.

split at first

Divides the given text into two pieces using the location of the first occurrence of at as the dividing point, and returns a two-item list consisting of the piece before the dividing point and the piece after the dividing point. Splitting apple,banana,cherry,dogfood with a comma as the splitting point returns a list of two items: the first is the text apple and the second is the text banana,cherry,dogfood. Notice that the comma after apple doesn't appear in the result, because that is the dividing point.

split at first of any

Divides the given text into a two-item list, using the first location of any item in the list at as the dividing point.

Splitting i love apples bananas apples grapes by the list [ba,ap] would result in a list of two items the first being i love and the second ples bananas apples grapes.

split

Divides text into pieces using at as the dividing points and produces a list of the results. Splitting one,two,three,four at ,(comma) returns the list one two three four. Splitting one-potato,two-potato,three-potato,four at-potato, returns the list one two three four.

split at any

Divides the given text into a list, using any of the items in at as the dividing point, and returns a list of the results.

Splitting appleberry,banana,cherry,dogfood with at as the two-element list whose first item is a comma and whose second item is rry returns a list of four items: [applebe, banana, che, dogfood,]

split at spaces

Divides the given text at any occurrence of a space, producing a list of the pieces.

segment

Extracts part of the text starting at start position and continuing for length characters.

replace all

Returns a new text string obtained by replacing all occurrences of the substring with the replacement.

Replace all with She loves eating. She loves writing. She loves coding as the text, She as the segment, and Hannah as the replacement would result in Hannah loves eating. Hannah loves writing. Hannah loves coding.

string
join
length
is empty?
compare texts
trim
upcase
downcase
starts at
contains
split at first
split at first of any
split
split at any
split at spaces
segment
replace all