[#BloombergLP-bdld-Datum-createStringRef-04e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::xref:BloombergLP/bdld/Datum.adoc[Datum]::createStringRef
:relfileprefix: ../../../
:mrdocs:

`createStringRef` overloads

== Synopses

Declared in `&lt;bdld&lowbar;datum&period;h&gt;`

Return a datum referring to the string described by `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdld/Datum.adoc[Datum]
xref:BloombergLP/bdld/Datum/createStringRef-04b.adoc[createStringRef](
    xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] const& value,
    xref:BloombergLP/bdld/Datum/AllocatorType.adoc[AllocatorType] const& allocator);
----

[.small]#xref:BloombergLP/bdld/Datum/createStringRef-04b.adoc[_» more&period;&period;&period;_]#

Return a datum referring to the specified null&hyphen;terminated string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdld/Datum.adoc[Datum]
xref:BloombergLP/bdld/Datum/createStringRef-01.adoc[createStringRef](
    char const* string,
    xref:BloombergLP/bdld/Datum/AllocatorType.adoc[AllocatorType] const& allocator);
----

[.small]#xref:BloombergLP/bdld/Datum/createStringRef-01.adoc[_» more&period;&period;&period;_]#

Return a datum referring to the specified string without copying it&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdld/Datum.adoc[Datum]
xref:BloombergLP/bdld/Datum/createStringRef-0e.adoc[createStringRef](
    char const* string,
    xref:BloombergLP/bdld/Datum/SizeType.adoc[SizeType] length,
    xref:BloombergLP/bdld/Datum/AllocatorType.adoc[AllocatorType] const& allocator);
----

[.small]#xref:BloombergLP/bdld/Datum/createStringRef-0e.adoc[_» more&period;&period;&period;_]#

== Return Value

* a datum referring to the string described by `value`
* a datum referring to the specified null&hyphen;terminated string
* a datum referring to the specified string without copying it

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| string reference to wrap
| *allocator*
| memory allocator to use
| *string*
| UTF&hyphen;8 null&hyphen;terminated string to reference
| *length*
| length of `string` in bytes
|===


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