Changed: Moved strFindReplaceAll to algo.h

--HG--
branch : develop
hg/compatibility-develop
kervala 7 years ago
parent 7f1168293a
commit d099e98dae

@ -211,6 +211,14 @@ bool strFindReplace(T &str, const char *strFind, const U &strReplace)
return strFindReplace(str, tempStr, strReplace);
}
template<class T>
T strFindReplaceAll(const T &str, const T &search, const T &replace)
{
T ret = str;
while (strFindReplace(ret, search, replace));
return ret;
}
// set flags in a bit set
template <class T, class U>
inline void setFlags(T &dest, U mask, bool on)

@ -1817,9 +1817,7 @@ namespace NLGUI
ucstring CLuaIHM::findReplaceAll(const ucstring &str, const ucstring &search, const ucstring &replace)
{
//H_AUTO(Lua_CLuaIHM_findReplaceAll)
ucstring ret= str;
while(strFindReplace(ret, search, replace));
return ret;
return strFindReplaceAll(str, search, replace);
}
// ***************************************************************************

Loading…
Cancel
Save