Пример #1
0
static int
str_8bit_tolower (const char *text, char **out, size_t * remain)
{
    if (*remain <= 1)
        return 0;
    (*out)[0] = char_tolower (text[0]);
    (*out)++;
    (*remain)--;
    return 1;
}
Пример #2
0
Файл: str.c Проект: hollow/lucid
char *str_tolower(char *str)
{
	char *p = str;

	while (*p) {
		char_tolower(*p);
		p++;
	}

	return str;
}
Пример #3
0
static char *
str_8bit_strdown (const char *str)
{
    char *rets, *p;

    rets = g_strdup (str);
    if (rets == NULL)
        return NULL;

    for (p = rets; *p != '\0'; p++)
        *p = char_tolower (*p);

    return rets;
}
Пример #4
0
/*
 * pp_generic_case_hash() - Assumes that p points to a GENERIC-compatible
 *    struct, and hashes on the lowercased name field of that struct.
 * return : hash value
 * p(in): A pointer to a generic structure to be hashed.
 */
unsigned int
pp_generic_case_hash (void *p)
{
  char *s, *d, nam[256];
  int i;
  GENERIC *gp;

  gp = (GENERIC *) p;
  s = gp->name;
  d = nam;
  if (s)
    {
      for (i = 0; *s && i < 256; s++, d++, i++)
	{
	  *d = char_tolower (*s);
	}
    }
  *d = '\0';

  return hashpjw (nam);
}