### Function

# Shell util_regex_escape

#### Declaration [src]

    char*
    shell_util_regex_escape (
      const char* str
    )

#### Description [src]

A wrapper around `g_regex_escape_string()` that takes its argument as \0-terminated string rather than a byte-array that confuses gjs.

#### Parameters

`str`

  Type: `const char*`

  A UTF-8 string to escape.

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

#### Return value

Type: `char*`

`str` with all regex-special characters escaped.

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.