From 69b083360513a4d0c4a7ad78345daca5ae2844c2 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 25 Apr 2022 17:22:12 +0300 Subject: Autocommit at 25.04.2022 @ 17:22 --- src/String/String.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/String/String.cpp') diff --git a/src/String/String.cpp b/src/String/String.cpp index 5169146..5cd8ca3 100644 --- a/src/String/String.cpp +++ b/src/String/String.cpp @@ -13,10 +13,6 @@ void String::copyFrom(const String& other) { length = other.length; } -void String::moveFrom(String&& other) { - -} - /* Public */ String::String(const char* str) { @@ -58,3 +54,11 @@ String& String::operator=(String&& other) { } return *this; } + +int String::compare(const String& other) { + return strcmp(str, other.str); +} + +char String::operator[](unsigned index) { + return str[index]; +} -- cgit v1.3.1-23-gd82d