[#BloombergLP-balber-BerUtil_StreambufUtil-peekChar]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil_StreambufUtil.adoc[BerUtil&lowbar;StreambufUtil]::peekChar
:relfileprefix: ../../../
:mrdocs:

Read the next byte from the specified `streamBuf` without advancing the read position and load that byte into the specified `value`&period;

== Synopsis

Declared in `&lt;balber&lowbar;berutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
peekChar(
    char* value,
    std::streambuf* streamBuf);
----

== Description

Return 0 on success, and a non&hyphen;zero value otherwise&period; If this operation is not successful, the value of `&ast;value` is unchanged&period; This operation fails if the input sequence of `streamBuf` is at its end&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| destination for the decoded value
| *streamBuf*
| input stream buffer
|===


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