aboutsummaryrefslogtreecommitdiff
path: root/week-5/StringWeek5.cpp
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-09-28 13:16:16 +0200
committerlonkaars <loek@pipeframe.xyz>2022-09-28 13:22:10 +0200
commit5c8d2ae4da91571f92f26d6e8352538c043e6b56 (patch)
treec285e6428af294551d33510c699addcedffe766a /week-5/StringWeek5.cpp
parent841697f039dc5670f53ec6597ef6f639eeebcb5a (diff)
week 5 huiswerk toegevoegd
Diffstat (limited to 'week-5/StringWeek5.cpp')
-rw-r--r--week-5/StringWeek5.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/week-5/StringWeek5.cpp b/week-5/StringWeek5.cpp
new file mode 100644
index 0000000..ae8ba9f
--- /dev/null
+++ b/week-5/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;
+}
+