diff options
Autocommit at 25.04.2022 @ 17:02
1 files changed, 13 insertions, 0 deletions
| -rw-r--r-- | src/String/String.cpp | 13 |
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); +} |
