ID:158427
 
Like if I have "Hero Sandwich", I want to be able to convert it to "HeroSandwich". I know there's a probably a lib out there or in the DM Reference somewhere but I can't find it.
Any text handling library has a replacing proc in it.
The built-in cKey() proc will get rid of spaces, but also of a bunch of other special symbols and characters, so keep that in mind. If that's not suitable, then you indeed need to parse the text manually and remove the spaces (using findtext() and copytext()) - or use a library to do so, as mentioned by Kaiochao.
    var/F
while(findtext(whatever," "))
F = findtext(whatever," ")
whatever = copytext(whatever,1,F)+copytext(whatever,F+1)
world << whatever


Strips whatever of spaces, and then shows it to the world.

Not sure if that's the most efficient way of doing it, but it works. :)