BloombergLP::bdlar::EnumRef::fromString

Assign the enumerator value matching the specified string of the specified stringLength.

Synopsis

Declared in <bdlar_enumref.h>

int
fromString(
    char const* string,
    int stringLength) const;

Description

Return 0 on success, and a non-zero value with no effect on the object if string and stringLength do not match any enumerator.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
stringstring representation of the enumerator
stringLengthlength of string in bytes