Delete starter and ending spaces

Hi!
I am creating a social network app and the users write their name in a textbox.
I want to delete the spaces that go before the name (for example: ’ markus’) and the ones that go in the end (from the name and the surname (for example: ’ john smith ’ = ‘john smith’).

Thank you very much for your help!

1 Like

Use replace block… Replace all the spaces…
IMG_20200731_200645

Hi!
Thanks for your answer, but if I use this block, the name John Doe would end as JohnDoe and I don’t want that…

So use join block to create name like that…

1 Like

Good idea!
I’m going to put a name and a surname textboxes!
Thank you very much for your reply!

1 Like

I know you’ve already marked it as a solution, but the correct block that does that is this one:

imagen

2 Likes

This will remove all the spaces as he answer me… He don’t want to remove the space between name & surname.

Yeah!
Thanks for your answer!
I’m surprised because I used this block so many times and now I asked just what it does… :slight_smile:
Thank you very much,
Markus

1 Like

No, the “trim” block only deletes unnecessary spaces. It doesn’t delete all spaces in string.