[#BloombergLP-balber-BerUtil_StringImpUtil-getStringValue]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil_StringImpUtil.adoc[BerUtil&lowbar;StringImpUtil]::getStringValue
:relfileprefix: ../../../
:mrdocs:

Decode a BER character string into a `bsl&colon;&colon;string`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
getStringValue(
    xref:bsl/string.adoc[bsl::string]* value,
    std::streambuf* streamBuf,
    int length,
    xref:BloombergLP/balber/BerDecoderOptions.adoc[BerDecoderOptions] const& options);
----

== Description

bytes as the value of the contents octets of a BER&hyphen;encoded character string (more specifically, an unrestricted character string) according to the specification, unless an alternate value is indicated by the specified `options`, in which case, the alternate value is loaded&period; If the `DefaultEmptyStrings` attribute of the `options` is `true` and the witnessed BER&hyphen;encoded character string represents the empty string value, the alternate value is the current `&ast;value`, otherwise there is no alternate value&period; Return 0 if successful, and a non&hyphen;zero value otherwise&period; The operation succeeds if `length` bytes are successfully read from the input sequence of the `streamBuf` without the read position becoming unavailable, and the bytes read contain a valid representation of the contents octets of a character string value according to the specification&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
| *length*
| number of content octets
| *options*
| decoder options controlling decoding behavior
|===


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