summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..b951358
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,29 @@
+#include "string.h"
+
+int main(int argc, char **argv)
+{
+ MyString mystr("alpha");
+ if (mystr.isSubstring("ph"))
+ {
+ cout << "true" << endl;
+ }
+ else
+ cout << "false" << endl;
+
+ MyString mystr1 = ", beta";
+ MyString mystr2 = ", charlie";
+ MyString mystr3 = ", delta";
+
+ mystr.concat(mystr1).concat(mystr2).concat(mystr3);
+ cout << mystr << endl;
+
+ MyString mystr4 = "hello";
+ mystr4.concat(", world!").concat(" goodbye");
+ cout << mystr4 << endl;
+
+ MyString mystr5 = "bro";
+ cout << mystr5 << endl;
+
+ return 0;
+}
+