aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-sqlite-statement.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-sqlite-statement.c')
-rw-r--r--lib/ephy-sqlite-statement.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ephy-sqlite-statement.c b/lib/ephy-sqlite-statement.c
index f95518a2a..6ff2454d9 100644
--- a/lib/ephy-sqlite-statement.c
+++ b/lib/ephy-sqlite-statement.c
@@ -267,3 +267,15 @@ ephy_sqlite_statement_get_column_as_blob (EphySQLiteStatement *self, int column)
{
return sqlite3_column_blob (self->priv->prepared_statement, column);
}
+
+char *
+ephy_sqlite_create_match_pattern (const char *match_string)
+{
+ char *string, *pattern;
+
+ string = g_strndup (match_string, EPHY_SQLITE_LIMIT_LIKE_PATTERN_LENGTH - 2);
+ pattern = g_strdup_printf ("%%%s%%", string);
+ g_free (string);
+
+ return pattern;
+}