- TagLib::StringList newlist;
-
- size_t delpos = 0;
- while (1) {
- size_t nextdelpos = rawtagarg.find('=', delpos+1);
- if (nextdelpos == -1)
- break;
- newlist.append(rawtagarg.substr(delpos,nextdelpos-delpos));
- delpos = nextdelpos+1;
+ stringstream tmpss;
+ TagLib::String key;
+ TagLib::StringList values;
+ int isplit=0;
+
+ for (int ipos=0; ipos < rawstring.length(); ipos++) {
+ if ( rawstring[ipos] == '\\' ) {
+ switch (rawstring[ipos+1]) {
+ case '\\':
+ tmpss << '\\';
+ break;
+ case '=':
+ tmpss << '=';
+ break;
+ default:
+ tmpss << '\\' << rawstring[ipos+1];
+ break;
+ }
+ ipos++;
+ }
+ else
+ if ( rawstring[ipos] == '=' ) {
+ if ( isplit == 0 )
+ key = tmpss.str();
+ else
+ values.append(tmpss.str());
+ isplit++;
+ tmpss.str("");
+ }
+ else
+ tmpss << rawstring[ipos];