/* Returns: TRUE if the strings are the same length and contain the same bytes  */
gboolean g_string_equal(const GString *v, const GString *v2)
/* Returns: TRUE if the strings are the same length and contain the same bytes  */
gboolean g_string_equal(const GString *v, const GString *v2)
{
  gchar *p, *q;
  GString *string1 = (GString *) v;
  GString *string2 = (GString *) v2;
  gsize i = string1->len;
  if (i != string2->len)
    return FALSE;
  p = string1->str;
  q = string2->str;
  while (i)
    {
      if (*p != *q)
        return FALSE;
      p++;
      q++;
      i--;
    }
  return TRUE;
}