diff options
Diffstat (limited to 'oop1w5/StringWeek5.cpp')
-rw-r--r-- | oop1w5/StringWeek5.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/oop1w5/StringWeek5.cpp b/oop1w5/StringWeek5.cpp new file mode 100644 index 0000000..ae8ba9f --- /dev/null +++ b/oop1w5/StringWeek5.cpp @@ -0,0 +1,12 @@ +#include <regex> + +#include "StringWeek5.h" + +void StringWeek5::removeAll(const std::string& remove) { + this->text = std::regex_replace(this->text, std::regex(remove), ""); +} + +const std::string& StringWeek5::getText() const { + return this->text; +} + |