[string.view.io] # 27 Strings library [[strings]](./#strings) ## 27.3 String view classes [[string.view]](string.view#io) ### 27.3.5 Inserters and extractors [string.view.io] [🔗](#lib:operator%3c%3c,basic_string_view) `template basic_ostream& operator<<(basic_ostream& os, basic_string_view str); ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L1656) *Effects*: Behaves as a formatted output function ([[ostream.formatted.reqmts]](ostream.formatted.reqmts "31.7.6.3.1 Common requirements")) of os[.](#1.sentence-1) Forms a character sequenceseq, initially consisting of the elements defined by the range [str.begin(), str.end())[.](#1.sentence-2) Determines padding for seq as described in [[ostream.formatted.reqmts]](ostream.formatted.reqmts "31.7.6.3.1 Common requirements")[.](#1.sentence-3) Then inserts seq as if by callingos.rdbuf()->sputn(​seq, n), where n is the larger of os.width() and str.size(); then calls os.​width(0)[.](#1.sentence-4) [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L1668) *Returns*: os[.](#2.sentence-1)