Remove spacing from string
Posted
#3578
(In Topic #680)

Standard member

Example: this is a test string
Output: thisisateststring
I checked out $TRIM and $DEEP_CLEAN and thought these would do the trick, but I guess I'm not fully understanding the definition of "white-space".
Any suggestions?
Posted

Site director

HTML won't show runs of multiple white-spaces (it'll just show 1 instead), but it won't strip them all.
If you just miswrote, and it's only reducing multiple white-spaces to 1, then applying the CSS 'white-space: pre' will make them show, although this also stops word-wrapping.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Posted

Site director

You need to use the 'REPLACE' symbol to literally replace the space character with blank.
OTTOMH…
{$REPLACE, ,,{SOME_PARAMETER}}
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Posted

Standard member

Chris Graham said
I mis-read.
You need to use the 'REPLACE' symbol to literally replace the space character with blank.
OTTOMH…
{$REPLACE, ,,{SOME_PARAMETER}}
From “Post #3,582”, 29th December 2017, 3:23 pm
I'll try that Chris, thanks!
1 guest and 0 members have just viewed this.