From f5a84b3c53ee37d83c33e9a6ad73b99866efcdc1 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Tue, 29 Sep 2020 16:43:33 +0200 Subject: erster checkin --- src/srcut.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/srcut.cpp (limited to 'src') diff --git a/src/srcut.cpp b/src/srcut.cpp new file mode 100644 index 0000000..194cc65 --- /dev/null +++ b/src/srcut.cpp @@ -0,0 +1,34 @@ +#include +#include +#include + +using namespace std; + +static void +process(istream& in, ostream& os) +{ + auto match_begin = [](string_view s) -> bool { + return s.empty(); + }; + + auto match_end = [](string_view s) -> bool { + return s.empty(); + }; + + for ( string line; getline(in, line); ) { + if ( match_begin(line) ) { + } + else if ( match_end(line) ) { + } + else { + os << line << '\n'; + } + } + os << flush; +} + +int +main(void) +{ + process(cin); +} -- cgit v1.3