Website Summary Files Commits Branches @commit @diff @stats
path: root / src / String / String.cpp
diff options
context:
space:
mode:
Commit69b083360513a4d0c4a7ad78345daca5ae2844c2 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-25 17:22:12 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-25 17:22:12 +0300
Files17394e4f56bbd4e9480a69751c071a19a888499b /src/String/String.cpp
FMI-OOP-P1_TicketSystem-69b083360513a4d0c4a7ad78345daca5ae2844c2.tar
FMI-OOP-P1_TicketSystem-69b083360513a4d0c4a7ad78345daca5ae2844c2.tar.gz
FMI-OOP-P1_TicketSystem-69b083360513a4d0c4a7ad78345daca5ae2844c2.zip
Parent69f55dc6b1599ae5b743a411fba3159661c9168c (diff)
Autocommit at 25.04.2022 @ 17:22
1 files changed, 8 insertions, 4 deletions
-rw-r--r--src/String/String.cpp12
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];
+}