[#BloombergLP-bdljsn-Json-makeString-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Json.adoc[Json]::makeString
:relfileprefix: ../../../
:mrdocs:

Replace this value with a string moved from `string`&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;json&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;STRING&lowbar;TYPE&gt;
void
makeString(xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef&lowbar;Deduced&lt;t&lowbar;STRING&lowbar;TYPE&gt;] string)
requires bsl&colon;&colon;is&lowbar;same&lt;t&lowbar;STRING&lowbar;TYPE,
                                         bsl&colon;&colon;string&gt;&colon;&colon;value;
----

== Description

Create an instance of type `bsl&colon;&colon;string` in this object, using the allocator currently held by this object to supply memory&period; Optionally specify `string` to initialize the `bsl&colon;&colon;string` created&period; This method first destroys the current value held by this object (even if the type currently held is `bsl&colon;&colon;string`)&period; This function does not participate in overload resolution unless the specified `t&lowbar;STRING&lowbar;TYPE` is `bsl&colon;&colon;string`&period; The behavior is undefined unless `string` is valid UTF&hyphen;8 (see `bdlde&colon;&colon;Utf8Util&colon;&colon;isValid`)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *string*
| UTF&hyphen;8 string value to store
|===


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