From 46d547be7e16dc24383d74e33143beef42606382 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 5 Jul 2015 17:59:39 +0200 Subject: rmtag.cc --- c,cc/rmtag.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 c,cc/rmtag.cc 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 + * 2015-06 + */ + +#include +#include + +using namespace std; + +int main(int argc, char const* argv[]) +{ + string s = " b "; + 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; +} + -- cgit v1.2.3