Delete starter and ending spaces

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…

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:



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

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,

1 Like

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

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