FwupdPlugin.strsafe
Description: Reference for FwupdPlugin.strsafe

### Function

# FwupdPluginstrsafe

#### Declaration [src]

    gchar*
    fu_strsafe (
      const gchar* str,
      gsize maxsz
    )

#### Description [src]

Converts a string into something that can be safely printed.

Available since: | 1.8.2

#### Parameters

`str` | `const gchar*`
| A string to make safe for printing.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`maxsz` | `gsize`
| Maximum size of returned string.

#### 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.