[#bsl-operator_S-033] = xref:bsl.adoc[bsl]::operator""_S :relfileprefix: ../ :mrdocs: Create a file‐scope string from a user‐defined literal. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/string.adoc[string] operator""_S( char const* characterString, std::size_t length); ---- == Description Convert a character sequence of the specified `length` excluding the terminating null character starting at the beginning of the specified `characterString` to a string object of the indicated return type. Use the `bslma::Default::globalAllocator()` to supply memory. (See the "Memory Allocation For a File‐Scope Strings" section in the component‐level documentation.) Example: ` using namespace bsl::string_literals; static const bsl::string g_str1 = "1230abc"_S; static const bsl::wstring g_str2 = L"1230abc"_S; ` == Return Value string constructed from the character literal == Parameters [cols="1,4"] |=== | Name| Description | *characterString* | pointer to the character sequence | *length* | number of characters excluding the null terminator |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#