Website Summary Files Commits Branches @commit @diff @stats
path: root / src / String / String.h
diff options
context:
space:
mode:
1 files changed, 26 insertions, 0 deletions
-rw-r--r--src/String/String.h26
diff --git a/src/String/String.h b/src/String/String.h
new file mode 100644
index 0000000..4accaef
--- /dev/null
+++ b/src/String/String.h
@@ -0,0 +1,26 @@
+#ifndef HEADER_STRING
+#define HEADER_STRING
+
+class String {
+ char* elems;
+ unsigned count;
+ unsigned length;
+
+ void free();
+ void copyFrom(const String& other);
+ void moveFrom(String&& other);
+
+public:
+ String();
+ String(const String& other);
+ String& operator=(const String& other);
+ ~String();
+
+ String(String&& other);
+ String& operator=(String&& other);
+
+ int compare(const String& other);
+ char operator[](unsigned index);
+};
+
+#endif