Removing Whitespace from a String

Hi all, Im working on massaging a string that has a lot of whitespace. My thought is to use split on space and then join all the non-empty values. My issue is when I use split, nothing changes. Not even on my test examples.

Looking for Ideas on how to remove whitespace or a way to get split working

Here im just using split with the value and separating with a , .
Screen Shot 2022-12-14 at 12.20.18 PM

Thanks! Luke

Hi @Luke_Milby, there is a function Called replace().
You can use this on your string with “space” as the variable to search for and “empty string” to replace it with :slight_smile:

2 Likes

Thanks @Richard_Johannes, I tried replace and tested with a string. Still no dice.

Step:
Screen Shot 2022-12-14 at 12.35.22 PM

Output
Screen Shot 2022-12-14 at 12.34.07 PM

1 Like

Sadly, not in Make right now but do you know text-variables? There is one for space and one for empty string. Those were what I meant. I can send you a screenshot later! :slight_smile:

2 Likes

@Richard_Johannes Heck Yeah, that worked

Step:
Screen Shot 2022-12-14 at 12.57.29 PM

Output:
Screen Shot 2022-12-14 at 12.57.37 PM

3 Likes

Mate, that’s what I wanted to see! congrats! :tada:

2 Likes

Helped me too, thanks =)

2 Likes