From ad9b755abb255ec0884b3d3091cb9514d8fd1381 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 25 Apr 2022 16:56:43 +0300 Subject: Autocommit at 25.04.2022 @ 16:56 --- src/String/String.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/String/String.h (limited to 'src/String/String.h') 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 -- cgit v1.3.1-23-gd82d