Is there a (clean) way to manipulate some text from std::cin before inserting it into a std::string
, so that the following would work:
cin >> setw(80) >> Uppercase >> mystring;
where mystring is std::string
(I don't want to use any wrappers for strings).
Uppercase
is a manipulator. I think it needs to act on the Chars in the buffer directly (no matter what is considered uppercase rather than lowercase now). Such a manipulator seems difficult to implement in a clean way, as user-defined manipulators, as far as I know, are used to just change or mix some pre-determined format flags easily.