### Function

# GLib strreverse

since: 2.0

#### Declaration

    gchar*
    g_strreverse (
      gchar* string
    )

#### Description

Reverses all of the bytes in a string. For example, `g_strreverse ("abcdef")` will result in “fedcba”.

Note that `g_strreverse()` doesn’t work on UTF-8 strings containing multibyte characters. For that purpose, use `g_utf8_strreverse()`.

Available since: 2.0

#### Parameters

`string`

  Type: `gchar*`

  The string to reverse.

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

#### Return value

Type: `gchar*`

The `string`, reversed in place.

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.