Remove spaces in strings

Get help using Construct 2

Post » Tue Jul 04, 2017 7:34 pm

Hi everyone,

I have a very silly question : I'd like to remove spaces from a string. I could set up a system to avoid this, but it be really more convenient if I had a way to do that.

Any ideas ? It's so simple to do in traditionnal languages... Construct 2 is so great, I can't believe it's hard to do such a thing !
B
6
S
1
Posts: 29
Reputation: 408

Post » Tue Jul 04, 2017 7:37 pm

It's far from hard. Here:

The fabulous manual wrote:replace(src, find, rep)
Find all occurrences of find in src and replace them with rep.
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Tue Jul 04, 2017 8:29 pm

Thanks a lot, for the answer and the link. I've already read this page, but I completly missed that apparently...
B
6
S
1
Posts: 29
Reputation: 408

Post » Wed Jul 05, 2017 1:05 am

Well to be fair, it's one of the most content heavy page in the manual. It's easy to start skimming and accidently skip a line. ;)
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests