From c9cbeced5b3f2bdd7407e29c0811e65954132540 Mon Sep 17 00:00:00 2001 From: Root THC Date: Tue, 24 Feb 2026 12:42:47 +0000 Subject: initial --- other/Kermit/test/test_string.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 other/Kermit/test/test_string.cpp (limited to 'other/Kermit/test/test_string.cpp') diff --git a/other/Kermit/test/test_string.cpp b/other/Kermit/test/test_string.cpp new file mode 100644 index 0000000..ad2de42 --- /dev/null +++ b/other/Kermit/test/test_string.cpp @@ -0,0 +1,20 @@ +#include +#include +#include + +main () +{ + string a = "Hallo,bla: foo!"; + int x = 0; + string b; + + cout << count (a.begin (), a.end (), 'l') << endl; + x = a.find_first_of (","); + b.resize (x + 1); + a.copy (b.begin (), x); + cout << b << endl; + a.erase (0, x + 1); + + cout << b << endl; + cout << a << endl; +} -- cgit v1.3