Originally Posted by Ketho
offtopic, but why didn't you just use strtrim / string.trim if you just wanted to remove "unneeded spaces"?
|
Originally Posted by Nibelheim
Trim only removes trailing and leading spaces. Replace was useful for converting "Buff Bar 1" to "BuffBar1".
|
It was to only remove spaces in certain situations. Just the spaces before and after a dash, as in "Playername - Server Name" to "Playername-Server Name" because "Playername-ServerName" wouldn't work for me. I was using strreplace(stringname, " - ", "-") and now use string.gsub(stringname, "%s%-%s", "-") and get the same results.
I never came across the bug because my strings were never very long, as they were just a list of tanks that are currently in my party.