Format text in mit app

Please help...
I want use a text for exaple :
Input text1 : "I888880231"
I want output in text2 ="I8-8888 023-1”
How i can do it?

Use the segment and JOIN text blocks.

Can you give me a example bock

What have you tried? This will help Text blocks

There are many ways to do this. The example will work provided the input always has 10 characters and the separations are always in the same place. Input garbage and you will return garbage. You probably should also provide checks to ensure your input is 10 characters in length and the first is a letter prior to doing the conversion. :slight_smile:

Is this what you want to do Pande?

Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles

How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also look here http://kio4.com/appinventor/index.htm and here http://www.imagnity.com/tutorial-index/ for more tutorials.

Regards,
Steve

1 Like

Another way.....

1 Like

Thank you it's ok

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.