[sword-devel] Request for SWBasicFilter
Joachim Ansorg
sword-devel@crosswire.org
Sun, 17 Feb 2002 01:27:08 +0100
I have the problem, that tokens in SWBasicFilter which were inserted with
addTokenSubstitute, need later an update of the replaceString.
So I think a function SWBasicFilter::replaceTokenSubstitute would be nice:
void SWBasicFilter::replaceTokenSubstitute(const char* findString, const
char* replaceString){
char *buf = 0;
tokenSubMap.erase( tokenSubMap.find(findString) ); //erase entry
if (!tokenCaseSensitive) {
stdstr(&buf, findString);
toupperstr(buf);
tokenSubMap.insert(DualStringMap::value_type(buf, replaceString));
delete [] buf;
}
else
tokenSubMap.insert(DualStringMap::value_type(findString, replaceString));
}
Since I don't know the STL very much I hope the above function is ok. Please
comment if I should add the function as soon as I have CVS again.
Joachim