Is it possible to remove white spaces in the middle of textbox


Is it possible to remove the spacing in the middle of the textbox when i press a button I know there is “trimming spaces from” box but is there a way to remove when the space is in the middle of the textbox?

I’m not sure what you mean. I see “123 abc”. Is the value of the Text Input’s Text something else like this?

"123 abc       "

“123 abc” just a space in the middle only

Are you wanting to convert “123 abc” to “123abc”? Please give a specific example.

Edit: you can use the Replace All block in the Text drawer to remove ALL spaces from a text string:

Just change the “a” to " " (a space) and delete the “b”. Replace “abc” with your text input’s text.

ya trying to convert “123 abc” to “123abc” can it work for other text inputs? not just 123abc

Yes:


It doesnt work for me when I try, These are the blocks I use.

That’s almost it. The replace all block already has quotes so you don’t need to add them. The box to the right of replace all should only contain a space, nothing else. Delete everything in it and press the space bar once.

If you’re still having trouble, post a link to your project.

1 Like

ok it works now thanks!

1 Like

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