Function

Tsparqlsparql_escape_string

Declaration [src]

gchar*
tracker_sparql_escape_string (
  const gchar* literal
)

Description [src]

Escapes literal so it is suitable for insertion in SPARQL queries as string literals.

Manual construction of query strings based user input is best avoided at all cost, use of TrackerSparqlStatement is recommended instead.

Parameters

literal

Type: const gchar*

A 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: gchar*

The escaped string.

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.