[FREE] StringFunctions Extension

In the text?

@Moin_khan

You can use the substrings block to get a list of substrings of length 10 and then select the first item in the list.

Good set of tools!
I have one suggestion to add. The “ChangeCase” block: with these options:

Sentence case.
Title Case.
UPPERCASE.
lowercase.
dUmB cAsE. :laughing:

2 Likes

@Italo

Thanks for the suggestion! I have added a new block!

2 Likes

New block update!

blocks (65)

ChangeCase
Changes the case of a string - ‘text’ according to the case given - ‘toCase’.
The valid cases are - upper case, lower case, sentence case, title case and toggle case.
If you enter a wrong case, an error will occur.
Example:

  • text = hello everybody | toCase = upper case returns HELLO EVERYBODY.
  • text = HELLO EVERYBODY | toCase = lower case returns hello everybody.
  • text = hello everybody. how are you? | toCase = sentence case returns Hello everybody. How are you?.
  • text = hello everybody | toCase = title case returns Hello Everybody.
  • text = hello everybody | toCase = toggle case returns randomly capitalized and lowered string like heLlO EveRyboDY.

I have updated the first post. You can download the updated extension from there.

5 Likes

That exists in all App Inventor based platforms/builders in the text category of blocks.

Good thing you called it toggle_case instead of dumb_case! :rofl:

2 Likes

Only uppercase and lowercase options are there.

Yeah :joy: !!!

1 Like

ChangeCase block ERROR

“sentence case” do “title case”

any suggestions?
(sorry my english)

how to remove two or more spaces into one space in text?

thank you really , you are great

can you please me how to extract world or characters from any string.
Example:

String is " Hello! My Friend How Are You?"
So if i want index 4 to 8 characters only how can i do it?

Guide:

Beginner’s guide: Text blocks - Guides - Kodular Community

i tried but with some texts only. with some links it shows index error
if any other solution available can you please share

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be. Also pleae asd the exact error message.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

1 Like

Thank you but my problem is resolved now. I directly put textbox text into segment text thats why it’s creating problem. I store textbox value into variable and then tried it’s worked.

fantastics! :+1::sparkles:

can I get sum result in strings data

Example

10,20,10,30,20
Total = 90

What about writing your own custom procedure to sum up the items of a list?

A very good way to learn App Inventor or Kodular 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 Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

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

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun