### Function

# Gck string_to_chars

since: 2

#### Declaration [src]

    gboolean
    gck_string_to_chars (
      guchar* data,
      gsize max,
      const gchar* string
    )

#### Description [src]

Create a space padded PKCS#11 string from a null terminated string. The string must be shorter than the buffer or `FALSE` will be returned.

If a `NULL` string is passed, then the space padded string will be set to zero characters.

Available since: 2

This function is not directly available to language bindings.

#### Parameters

`data`

  Type: `guchar*`

  The character buffer to place string into.

  The data is owned by the caller of the function.

`max`

  Type: `gsize`

  The maximum length of the charater buffer.

`string`

  Type: `const gchar*`

  The string to place in the buffer.

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

#### Return value

Type: `gboolean`

The null terminated string.