absl::AbslParseFlag

AbslParseFlag overloads

Synopses

Declared in <absl/flags/marshalling.h>

Parses a command-line flag string representation text into a Duration value. Duration flags must be specified in a format that is valid input for absl::ParseDuration().

bool
AbslParseFlag(
    std::string_view text,
    Duration* dst,
    std::string* error);
» more...

Parses an absl::LogSeverity flag value. See base/log_severity.h for the full documentation.

bool
AbslParseFlag(
    std::string_view text,
    absl::LogSeverity* dst,
    std::string* err);
» more...

Parses the command-line flag string representation text into a Time value. Time flags must be specified in a format that matches absl::RFC3339_full.

bool
AbslParseFlag(
    std::string_view text,
    Time* t,
    std::string* error);
» more...

Return Value

  • true upon successful parsing.
  • true if the value was successfully parsed.

Parameters

NameDescription
textThe flag string to parse.
dstOutput parameter receiving the parsed duration.
errorOutput parameter receiving an error message on failure.
errOutput parameter that receives an error message on failure.
tOutput parameter receiving the parsed time.