[basic.string.literals] # 27 Strings library [[strings]](./#strings) ## 27.4 String classes [[string.classes]](string.classes#basic.string.literals) ### 27.4.7 Suffix for basic_string literals [basic.string.literals] [🔗](#lib:operator%22%22s,string) `constexpr string operator""s(const char* str, size_t len); ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L5407) *Returns*: string{str, len}[.](#1.sentence-1) [🔗](#lib:operator%22%22s,u8string) `constexpr u8string operator""s(const char8_t* str, size_t len); ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L5417) *Returns*: u8string{str, len}[.](#2.sentence-1) [🔗](#lib:operator%22%22s,u16string) `constexpr u16string operator""s(const char16_t* str, size_t len); ` [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L5427) *Returns*: u16string{str, len}[.](#3.sentence-1) [🔗](#lib:operator%22%22s,u32string) `constexpr u32string operator""s(const char32_t* str, size_t len); ` [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L5437) *Returns*: u32string{str, len}[.](#4.sentence-1) [🔗](#lib:operator%22%22s,wstring) `constexpr wstring operator""s(const wchar_t* str, size_t len); ` [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L5447) *Returns*: wstring{str, len}[.](#5.sentence-1) [6](#6) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L5452) [*Note [1](#note-1)*: The same suffix s is used for chrono​::​duration literals denoting seconds but there is no conflict, since duration suffixes apply to numbers and string literal suffixes apply to character array literals[.](#6.sentence-1) — *end note*]