ippContainsString(
    ipp_attribute_t *attr,		/* I - Attribute */
    const char      *value)		/* I - String value */
{
  int		i;			/* Looping var */
  _ipp_value_t	*avalue;		/* Current attribute value */


  DEBUG_printf(("ippContainsString(attr=%p, value=\"%s\")", (void *)attr, value));

 /*
  * Range check input...
  */

  if (!attr || !value)
  {
    DEBUG_puts("1ippContainsString: Returning 0 (bad input)");
    return (0);
  }

 /*
  * Compare...
  */

  DEBUG_printf(("1ippContainsString: attr %s, %s with %d values.",
		attr->name, ippTagString(attr->value_tag),
		attr->num_values));

  switch (attr->value_tag & IPP_TAG_CUPS_MASK)
  {
    case IPP_TAG_CHARSET :
    case IPP_TAG_KEYWORD :
    case IPP_TAG_LANGUAGE :
    case IPP_TAG_URI :
    case IPP_TAG_URISCHEME :
	for (i = attr->num_values, avalue = attr->values;
	     i > 0;
	     i --, avalue ++)
	{
	  DEBUG_printf(("1ippContainsString: value[%d]=\"%s\"",
	                attr->num_values - i, avalue->string.text));

	  if (!strcmp(value, avalue->string.text))
	  {
	    DEBUG_puts("1ippContainsString: Returning 1 (match)");
	    return (1);
	  }
        }

    case IPP_TAG_MIMETYPE :
    case IPP_TAG_NAME :
    case IPP_TAG_NAMELANG :
    case IPP_TAG_TEXT :
    case IPP_TAG_TEXTLANG :
	for (i = attr->num_values, avalue = attr->values;
	     i > 0;
	     i --, avalue ++)
	{
	  DEBUG_printf(("1ippContainsString: value[%d]=\"%s\"",
	                attr->num_values - i, avalue->string.text));

	  if (!_cups_strcasecmp(value, avalue->string.text))
	  {
	    DEBUG_puts("1ippContainsString: Returning 1 (match)");
	    return (1);
	  }
        }

    default :
        break;
  }

  DEBUG_puts("1ippContainsString: Returning 0 (no match)");

  return (0);
}
ippContainsString(
    ipp_attribute_t *attr,		 
    const char      *value)		 
{
  int		i;			 
  _ipp_value_t	*avalue;		 


  DEBUG_printf(("ippContainsString(attr=%p, value=\"%s\")", (void *)attr, value));

  

  if (!attr || !value)
  {
    DEBUG_puts("1ippContainsString: Returning 0 (bad input)");
    return (0);
  }

  

  DEBUG_printf(("1ippContainsString: attr %s, %s with %d values.",
		attr->name, ippTagString(attr->value_tag),
		attr->num_values));

  switch (attr->value_tag & IPP_TAG_CUPS_MASK)
  {
    case IPP_TAG_CHARSET :
    case IPP_TAG_KEYWORD :
    case IPP_TAG_LANGUAGE :
    case IPP_TAG_URI :
    case IPP_TAG_URISCHEME :
	for (i = attr->num_values, avalue = attr->values;
	     i > 0;
	     i --, avalue ++)
	{
	  DEBUG_printf(("1ippContainsString: value[%d]=\"%s\"",
	                attr->num_values - i, avalue->string.text));

	  if (!strcmp(value, avalue->string.text))
	  {
	    DEBUG_puts("1ippContainsString: Returning 1 (match)");
	    return (1);
	  }
        }

    case IPP_TAG_MIMETYPE :
    case IPP_TAG_NAME :
    case IPP_TAG_NAMELANG :
    case IPP_TAG_TEXT :
    case IPP_TAG_TEXTLANG :
	for (i = attr->num_values, avalue = attr->values;
	     i > 0;
	     i --, avalue ++)
	{
	  DEBUG_printf(("1ippContainsString: value[%d]=\"%s\"",
	                attr->num_values - i, avalue->string.text));

	  if (!_cups_strcasecmp(value, avalue->string.text))
	  {
	    DEBUG_puts("1ippContainsString: Returning 1 (match)");
	    return (1);
	  }
        }

    default :
        break;
  }

  DEBUG_puts("1ippContainsString: Returning 0 (no match)");

  return (0);
}