[quoted.manip] (original) (raw)
Returns: An object of unspecified type such that if out is an instance of basic_ostream with member type char_type the same ascharT and with member type traits_type, which in the second and third forms is the same as traits, then the expressionout << quoted(s, delim, escape)behaves as a formatted output functionof out.
This forms a character sequence seq, initially consisting of the following elements:
- Each character in s.
If the character to be output is equal toescape or delim, as determined by traits_type::eq, first output escape.
Let x be the number of elements initially in seq.
Then padding is determined for seq as described in [ostream.formatted.reqmts], seq is inserted as if by callingout.rdbuf()->sputn(seq, n), where n is the larger ofout.width() and x, and out.width(0) is called.
The expression out << quoted(s, delim, escape) has typebasic_ostream<charT, traits>& and value out.