summaryrefslogtreecommitdiff
path: root/src/string.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-08-29 21:50:48 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-08-29 21:50:48 +0200
commit2825bc3d7b40790c1e6e2a48a5a604b0e184b21a (patch)
tree2dd9f0aef75da0ab4b77a73f5795f93ffd860798 /src/string.cc
parentbbce6b22a3e04fe900ac9565b0703304d651b63a (diff)
Fix escaped whitespace handling in command manager
Diffstat (limited to 'src/string.cc')
-rw-r--r--src/string.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/string.cc b/src/string.cc
index 9e2d1507..042bba77 100644
--- a/src/string.cc
+++ b/src/string.cc
@@ -48,4 +48,11 @@ std::vector<String> split(const String& str, Character separator)
return res;
}
+String String::replace(const String& expression,
+ const String& replacement) const
+{
+ boost::regex re(expression.m_content);
+ return String(boost::regex_replace(m_content, re, replacement.m_content));
+}
+
}