[#absl-StatusMessageAsCStr]
= xref:absl.adoc[absl]::StatusMessageAsCStr
:relfileprefix: ../
:mrdocs:

Retrieves a message&apos;s status as a null terminated C string&period;

== Synopsis

Declared in `&lt;absl&sol;status&sol;status&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
char const*
StatusMessageAsCStr(xref:absl/Status.adoc[Status] const& status);
----

== Description

The lifetime of this string is tied to the lifetime of the status object itself&period;

If the status&apos;s message is empty, the empty string is returned&period;

StatusMessageAsCStr exists for C support&period; Use `status&period;message()` in C&plus;&plus;&period;

== Return Value

A null&hyphen;terminated C string for the status message&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *status*
| The status whose message is retrieved&period;
|===


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