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

Return a modifiable character buffer

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
char*
prepare(std::size&lowbar;t n) = 0;
----

== Description

This function attempts to obtain a character buffer with space for at least `n` characters&period; Upon success, a pointer to the beginning of the buffer is returned&period; Ownership is not transferred&semi; the caller should not attempt to free the storage&period; The buffer shall remain valid until `this` is destroyed&period;

[NOTE]
====
This function may only be called once&period; After invoking the function, the only valid operation is destruction&period;

====

== Return Value

A pointer to the buffer

== Parameters

[cols="1,4"]
|===
|Name|Description

| *n*
| The number of characters needed
|===


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