diff options
| author | Leonetienne <leonetienne@hotmail.de> | 2022-02-10 05:34:07 +0100 |
|---|---|---|
| committer | Leonetienne <leonetienne@hotmail.de> | 2022-02-10 05:34:07 +0100 |
| commit | ba5f0cbd9468e4c0d126c4ab199844576e0121df (patch) | |
| tree | 7c41d366eb05dbf6f0da6394fc285d8664cc29bd /main.cpp | |
| parent | e9b5c29b35fda84af83803131515994865e2cb4e (diff) | |
Impwuvd piping behaviour
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -29,7 +29,6 @@ bool IsLetter(const char c) { return (lowercase_c >= 'a') && (lowercase_c <= 'z'); } - //! Checks whether or not `c` is an uppercase character bool IsUpper(const char c) { if (!IsLetter(c)) @@ -339,9 +338,13 @@ int main(int argc, char** argv) { // Else, be prepared to get __piped__ else { + // We're better off processing all in one go, as to not re-seed the PRNG for every single line... std::string buf; + std::stringstream ss; while (std::getline(std::cin, buf)) - std::cout << MakeUwu(buf) << std::endl; + ss << buf << std::endl; + + std::cout << MakeUwu(ss.str()) << std::endl; } return 0; |
