css: Add _gtk_css_parser_has_prefix()

This commit is contained in:
Benjamin Otte 2011-12-20 08:15:18 +01:00
parent 11ec705133
commit 38be9fe879
2 changed files with 11 additions and 0 deletions

View File

@ -92,6 +92,15 @@ _gtk_css_parser_begins_with (GtkCssParser *parser,
return *parser->data == c;
}
gboolean
_gtk_css_parser_has_prefix (GtkCssParser *parser,
const char *prefix)
{
g_return_val_if_fail (GTK_IS_CSS_PARSER (parser), FALSE);
return g_ascii_strncasecmp (parser->data, prefix, strlen (prefix)) == 0;
}
guint
_gtk_css_parser_get_line (GtkCssParser *parser)
{

View File

@ -47,6 +47,8 @@ guint _gtk_css_parser_get_position (GtkCssParser *parser
gboolean _gtk_css_parser_is_eof (GtkCssParser *parser);
gboolean _gtk_css_parser_begins_with (GtkCssParser *parser,
char c);
gboolean _gtk_css_parser_has_prefix (GtkCssParser *parser,
const char *prefix);
gboolean _gtk_css_parser_is_string (GtkCssParser *parser);
/* IMPORTANT: