Core: optimize string splitting

- Mainly affects item loading performance
  - Reduces guild loading time a lot

--HG--
branch : trunk
This commit is contained in:
linencloth
2010-10-21 16:56:51 +02:00
parent f275f8b4b5
commit d9d1ec3670
9 changed files with 64 additions and 55 deletions
+6 -2
View File
@@ -24,9 +24,13 @@
#include <string>
#include <vector>
typedef std::vector<std::string> Tokens;
struct Tokens: public std::vector<char*>
{
Tokens(const std::string &src, const char sep, uint32 vectorReserve = 0);
~Tokens() { delete m_str; }
Tokens StrSplit(const std::string &src, const std::string &sep);
char* m_str;
};
void stripLineInvisibleChars(std::string &src);