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
Alapjeet
(Alapjeet Singh)
July 31, 2020, 2:37pm
#2
Use replace block… Replace all the spaces…
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…
Alapjeet
(Alapjeet Singh)
July 31, 2020, 2:44pm
#4
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
pepocero
(Pepocero)
July 31, 2020, 2:51pm
#6
I know you’ve already marked it as a solution, but the correct block that does that is this one:
3 Likes
Alapjeet
(Alapjeet Singh)
July 31, 2020, 2:53pm
#7
This will remove all the spaces as he answer me… He don’t want to remove the space between name & surname.
1 Like
Yeah!
Thanks for your answer!
I’m surprised because I used this block so many times and now I asked just what it does…
Thank you very much,
Markus
1 Like
yusufcihan
(Yusuf Cihan)
August 1, 2020, 10:26am
#9
No, the “trim” block only deletes unnecessary spaces. It doesn’t delete all spaces in string.
1 Like
system
(system)
Closed
August 31, 2020, 10:26am
#10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.