summaryrefslogtreecommitdiff
path: root/c,cc/rmtag.cc
blob: bdcc8e63ebb2c4765b86b57d309ff4679402f68b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}