summaryrefslogtreecommitdiffstats
path: root/source/StringUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/StringUtils.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/StringUtils.cpp b/source/StringUtils.cpp
index 94b4d3c0f..c9dbb1113 100644
--- a/source/StringUtils.cpp
+++ b/source/StringUtils.cpp
@@ -146,3 +146,16 @@ int NoCaseCompare(const AString & s1, const AString & s2)
+void ReplaceString(AString & iHayStack, const AString & iNeedle, const AString & iReplaceWith)
+{
+ size_t pos1 = iHayStack.find(iNeedle);
+ while (pos1 != AString::npos)
+ {
+ iHayStack.replace( pos1, iNeedle.size(), iReplaceWith);
+ pos1 = iHayStack.find(iNeedle, pos1);
+ }
+}
+
+
+
+