Function

FwupdPluginFirmwarestrparse_uint4_safe

Declaration [src]

gboolean
fu_firmware_strparse_uint4_safe (
  const gchar* data,
  gsize datasz,
  gsize offset,
  guint8* value,
  GError** error
)

Description [src]

Parses a base 16 number from a string of 1 character in length. The returned value will range from from 0 to 0xf.

Available since:1.5.6

Parameters

data const gchar*
 

Destination buffer.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
datasz gsize
 

Size of data, typically the same as strlen(data)

offset gsize
 

Offset in chars into data to read.

value guint8*
 

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.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if parsed, FALSE otherwise.