summaryrefslogtreecommitdiff
path: root/c,cc/rmtag.cc
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-07-05 17:59:39 +0200
committerPatrick Simianer <p@simianer.de>2015-07-05 17:59:39 +0200
commit46d547be7e16dc24383d74e33143beef42606382 (patch)
treeb6f391cbfbde11efceccf6b75fa122384b86f816 /c,cc/rmtag.cc
parentd023685532180142747b9d07c15d31bfc56cd436 (diff)
rmtag.cc
Diffstat (limited to 'c,cc/rmtag.cc')
-rw-r--r--c,cc/rmtag.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/c,cc/rmtag.cc b/c,cc/rmtag.cc
new file mode 100644
index 0000000..bdcc8e6
--- /dev/null
+++ b/c,cc/rmtag.cc
@@ -0,0 +1,22 @@
+/*
+ * rmtag.cpp
+ *
+ * Patrick Simianer <p@simianer.de>
+ * 2015-06
+ */
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+int main(int argc, char const* argv[])
+{
+ string s = "<a> b </a>";
+ cout << s << endl;
+ cout << s.find_first_of(">") << endl;
+ cout << s.find_last_of("<") << endl;
+ cout << s.substr(s.find_first_of(">")+1, s.find_last_of("<")-3) << endl;
+ return 0;
+}
+