Website Summary Files Commits Branches @commit @diff @stats
path: root / src / String / String.cpp
diff options
context:
space:
mode:
1 files changed, 13 insertions, 0 deletions
-rw-r--r--src/String/String.cpp13
diff --git a/src/String/String.cpp b/src/String/String.cpp
new file mode 100644
index 0000000..f94dce2
--- /dev/null
+++ b/src/String/String.cpp
@@ -0,0 +1,13 @@
+#include "String.h"
+#include <cstring>
+
+/* Private */
+
+void String::free() {
+ delete[] str;
+}
+
+void String::copyFrom(const String& other) {
+ this->str = new char[other.length];
+ strcpy(this->str, other.str);
+}