pacemaker
3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
|
API for strings. More...
#include <glib.h>
Go to the source code of this file.
Functions | |
long long | crm_get_msec (const char *input) |
Parse a time+units string and return milliseconds equivalent. More... | |
int | pcmk_parse_interval_spec (const char *input, guint *result_ms) |
Parse milliseconds from a Pacemaker interval specification. More... | |
gboolean | crm_is_true (const char *s) |
int | crm_str_to_boolean (const char *s, int *ret) |
char * | crm_strdup_printf (char const *format,...) G_GNUC_PRINTF(1 |
API for strings.
Definition in file strings.h.
long long crm_get_msec | ( | const char * | input | ) |
Parse a time+units string and return milliseconds equivalent.
[in] | input | String with a nonnegative number and optional unit (optionally with whitespace before and/or after the number). If missing, the unit defaults to seconds. |
PCMK__PARSE_INT_DEFAULT
on error char* crm_strdup_printf | ( | char const * | format, |
... | |||
) |
int pcmk_parse_interval_spec | ( | const char * | input, |
guint * | result_ms | ||
) |
Parse milliseconds from a Pacemaker interval specification.
[in] | input | Pacemaker time interval specification (a bare number of seconds; a number with a unit, optionally with whitespace before and/or after the number; or an ISO 8601 duration) |
[out] | result_ms | Where to store milliseconds equivalent of input on success (limited to the range of an unsigned integer), or 0 if input is NULL or invalid |
pcmk_rc_ok
if input
is valid or NULL
, and EINVAL
otherwise)