ID:159791
 
I'm trying to develop a proc, that if it finds a symbol it will change the symbol into a html tag. But I can't get it to work. I used Deadron's Text Handling and tried find the symbol and switching it but it didn't work..
Well you could do something like this. (this changes all spaces in a sentence with underscores)

    proc/Start()
last_mode = max(votes)
if(findtext(last_mode," "))
for(var/space=findtext(last_mode," "),space,space=findtext(last_mode," ",space+1))
last_mode = copytext(last_mode,1,space)+"_"+copytext(last_mode,space+1)
var/b = text2path("/Modes/[last_mode]")


last_mode returns a text string. Well, it's just an example, I hope you can figure the rest out yourself. :)