[#BloombergLP-bsls-NameOf_Base-initBuffer]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/NameOf_Base.adoc[NameOf&lowbar;Base]::initBuffer
:relfileprefix: ../../../
:mrdocs:

Initialize `buffer` with the type name extracted from `functionName`&period;

== Synopsis

Declared in `&lt;bsls&lowbar;nameof&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char const*
initBuffer(
    char* buffer,
    char const* functionName);
----

== Description

Initialize the specified `buffer` with the type name contained in the specified `functionName`, where `functionName` is the function name of the `NameOf` constructor&period; Return either a pointer to `buffer`, or if `buffer` couldn&apos;t be properly initialized, `functionName`&period;

== Return Value

`buffer` on success, or `functionName` if initialization fails

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| destination buffer for the extracted type name
| *functionName*
| function signature string containing the type name
|===


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