[#BloombergLP-bdlat_EnumFunctions-fromString]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlat_EnumFunctions.adoc[bdlat&lowbar;EnumFunctions]::fromString
:relfileprefix: ../../
:mrdocs:

Load into the specified `result` the enumerator matching the specified `string` of the specified `stringLength`&period;

== Synopsis

Declared in `&lt;bdlat&lowbar;enumfunctions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
int
fromString(
    TYPE* result,
    char const* string,
    int stringLength);
----

== Description

Return 0 on success, and a non&hyphen;zero value with no effect on `result` if `string` and `stringLength` do not match any enumerator&period;

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| enumeration object to receive the matching enumerator
| *string*
| string representation of the enumerator
| *stringLength*
| length of `string`
|===


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