From 2825bc3d7b40790c1e6e2a48a5a604b0e184b21a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 29 Aug 2012 21:50:48 +0200 Subject: Fix escaped whitespace handling in command manager --- src/string.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/string.cc') 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 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)); +} + } -- cgit v1.2.3