Remove spacing from string

Post

Posted
Rating:
#3569 (In Topic #709)
Joe
I'm trying to make a string containing spaces output without any spaces.

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?

Post

Posted
Rating:
#3572
If that's really what's happening, it must be happening in some very specific context (let us know what exactly).
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.

Post

Posted
Rating:
#3573
I mis-read.

You need to use the 'REPLACE' symbol to literally replace the space character with blank.

OTTOMH…

{$REPLACE, ,,{SOME_PARAMETER}}

Post

Posted
Rating:
#3574
Joe

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}}

I'll try that Chris, thanks!
0 guests and 0 members have recently viewed this.