Replace space with underscore

Discuss PC Developer and Web Developer projects and features here.
Post Reply
wayne_millard
Posts: 94
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 6:12 pm
Has thanked: 1 time
Been thanked: 9 times

Replace space with underscore

Post by wayne_millard »

Hi Everyone,

How can i replace spaces for underscores in strings?

Thanks,
Wayne M

mnfisher
Valued Contributor
Posts: 938
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 502 times

Re: Replace space with underscore

Post by mnfisher »

You need to step over the string in a loop and replace the ' ' characters with an '_' (I've assumed you want ' ' -> '_' - but this is easily changed if you want '_' -> ' ')

Such as:
replace.fcfx
(8.37 KiB) Downloaded 157 times
Martin

wayne_millard
Posts: 94
Joined: Fri Dec 04, 2020 6:12 pm
Has thanked: 1 time
Been thanked: 9 times

Re: Replace space with underscore

Post by wayne_millard »

Hi Martin,

Thanks for the example.

Wayne M

Post Reply