[#BloombergLP-bdldfp-DecimalUtil_CStringUtil-flatten-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil.adoc[DecimalUtil&lowbar;CStringUtil]::flatten
:relfileprefix: ../../../
:mrdocs:

`flatten` overloads

== Synopses

Declared in `&lt;bdldfp&lowbar;decimalutil&period;h&gt;`

Return a temporary `bsl&colon;&colon;string` constructed from the specified `stringRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:bsl/string.adoc[bsl::string]
xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0a.adoc[flatten](xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] const& stringRef);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0a.adoc[_» more&period;&period;&period;_]#

Return the result of invoking &apos;c&lowbar;str()&apos; on the specified &apos;string&apos;&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char const*
xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0f4.adoc[flatten](xref:bsl/string.adoc[bsl::string] const& string);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0f4.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `flatten`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char const*
xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0bb.adoc[flatten](std::pmr::string const& string);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0bb.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `bsl&colon;&colon;string`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char const*
xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0c.adoc[flatten](std::string const& string);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0c.adoc[_» more&period;&period;&period;_]#

Same as the related overload above for `flatten`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char const*
xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0f8.adoc[flatten](char* cString);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0f8.adoc[_» more&period;&period;&period;_]#

Return the specified `cString`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char const*
xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0b8.adoc[flatten](char const* cString);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-0b8.adoc[_» more&period;&period;&period;_]#

Produce a compile&hyphen;time error informing the caller that the parameterized `TYPE` is not supported as the parameter for the call&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
static
char const*
xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-03.adoc[flatten](TYPE const& value);
----

[.small]#xref:BloombergLP/bdldfp/DecimalUtil_CStringUtil/flatten-03.adoc[_» more&period;&period;&period;_]#

== Return Value

* temporary `bsl&colon;&colon;string` constructed from `stringRef`
* result of invoking `c&lowbar;str()` on `string`
* `cString` unchanged
* never returns&semi; produces a compile&hyphen;time error

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stringRef*
| string reference used to build a temporary string
| *string*
| string whose `c&lowbar;str()` result is returned
| *cString*
| null&hyphen;terminated C string to return unchanged
| *value*
| unsupported argument used only to select this overload
|===


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