[#boost-urls-string_token-preserve_size]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/string_token.adoc[string&lowbar;token]::preserve&lowbar;size
:relfileprefix: ../../../
:mrdocs:

Create a string token for a durable core&colon;&colon;string&lowbar;view

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/string_token.hpp#L464[boost&sol;url&sol;grammar&sol;string&lowbar;token&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class Alloc = std::allocator&lt;char&gt;&gt;
&sol;&ast; implementation-defined &ast;&sol;
preserve&lowbar;size(std::basic&lowbar;string&lt;char, std::char&lowbar;traits&lt;char&gt;, Alloc&gt;& s);
----

== Description

This function creates a xref:boost/urls/string_token/StringToken.adoc[`StringToken`] which assigns to an existing plain string&period;

Functions using this token will assign the result to the existing string and return a `core&colon;&colon;string&lowbar;view` to it&period;

== Return Value

A string token

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| The string to preserve
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
