Function

FwupdPluginstrsafe_bytes

Declaration [src]

gchar*
fu_strsafe_bytes (
  GBytes* blob,
  gsize maxsz
)

Description [src]

Converts a GBytes into something that can be safely printed.

Available since:2.0.2

Parameters

blob GBytes
 

A GBytes.

 The data is owned by the caller of the function.
maxsz gsize
 

Maximum size of returned string, or G_MAXSIZE for no limit.

Return value

Returns: gchar*
 

Safe string, or NULL if there was nothing valid.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The value is a NUL terminated UTF-8 string.