[#BloombergLP-balber-BerUtil-putLength]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil.adoc[BerUtil]::putLength
:relfileprefix: ../../../
:mrdocs:

Encode the specified `length` to the specified `streamBuf`&period;

== Synopsis

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

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

== Description

Return 0 on success, and a non&hyphen;zero value otherwise&period; The behavior is undefined unless `0 &lt;&equals; length`&period;

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *streamBuf*
| output stream buffer
| *length*
| length quantity to encode
|===


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