Function

FwupdPluginstrtoull

Declaration [src]

gboolean
fu_strtoull (
  const gchar* str,
  guint64* value,
  guint64 min,
  guint64 max,
  GError** error
)

Description [src]

Converts a string value to an integer. Values are assumed base 10, unless prefixed with “0x” where they are parsed as base 16.

Available since:1.8.2

Parameters

str const gchar*
 

A string, e.g. 0x1234

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
value guint64*
 

Parsed value.

 The argument will be set by the function.
 The argument can be set to NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
min guint64
 

Minimum acceptable value, typically 0

max guint64
 

Maximum acceptable value, typically G_MAXUINT64

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if the value was parsed correctly, or FALSE for error.