View Single Post
06-27-11, 11:43 AM   #18
qod
A Murloc Raider
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 6
Originally Posted by Ketho View Post
offtopic, but why didn't you just use strtrim / string.trim if you just wanted to remove "unneeded spaces"?
Originally Posted by Nibelheim View Post
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.
  Reply With Quote