Skip to Main Content
BBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks
book

BBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks

by Pradeeka Seneviratne
June 2019
Beginner content levelBeginner
367 pages
6h 3m
English
Apress
Content preview from BBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks
© Pradeeka Seneviratne  2019
Pradeeka SeneviratneBBC micro:bit Recipeshttps://doi.org/10.1007/978-1-4842-4913-0_4

4. Working with Text

Pradeeka Seneviratne1 
(1)
Udumulla, Mulleriyawa, Sri Lanka
 

MakeCode has many blocks to offer when it comes to manipulating text strings. In this chapter you will learn how to find the length of a text, joining together any number of pieces of text, comparing two strings, extracting a part from a string, converting a string to a number, and extracting a character from a string at the specified index.

4-1. Finding the Length of a Text

Problem

You want to find the length of a text.

Solution

  • In the Toolbox, click on the Basic category. Then click and drag the show number block over, and place it inside of the on start block. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning e-Textile Development: Prototyping e-Textiles with Wearic Smart Textiles Kit and the BBC micro:bit

Beginning e-Textile Development: Prototyping e-Textiles with Wearic Smart Textiles Kit and the BBC micro:bit

Pradeeka Seneviratne

Publisher Resources

ISBN: 9781484249130Purchase LinkPublisher Website