OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [string/] [strlwr.c] - Diff between revs 1010 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 1010 Rev 1765
/*
/*
FUNCTION
FUNCTION
        <<strlwr>>---force string to lower case
        <<strlwr>>---force string to lower case
 
 
INDEX
INDEX
        strlwr
        strlwr
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <string.h>
        #include <string.h>
        char *strlwr(char *<[a]>);
        char *strlwr(char *<[a]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <string.h>
        #include <string.h>
        char *strlwr(<[a]>)
        char *strlwr(<[a]>)
        char *<[a]>;
        char *<[a]>;
 
 
DESCRIPTION
DESCRIPTION
        <<strlwr>> converts each characters in the string at <[a]> to
        <<strlwr>> converts each characters in the string at <[a]> to
        lower case.
        lower case.
 
 
RETURNS
RETURNS
        <<strlwr>> returns its argument, <[a]>.
        <<strlwr>> returns its argument, <[a]>.
 
 
PORTABILITY
PORTABILITY
<<strlwr>> is not widely portable.
<<strlwr>> is not widely portable.
 
 
<<strlwr>> requires no supporting OS subroutines.
<<strlwr>> requires no supporting OS subroutines.
 
 
QUICKREF
QUICKREF
        strlwr
        strlwr
*/
*/
 
 
#include <string.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
 
 
char *
char *
strlwr (a)
strlwr (a)
     char *a;
     char *a;
{
{
  char *ret = a;
  char *ret = a;
 
 
  while (*a != '\0')
  while (*a != '\0')
    {
    {
      if (isupper (*a))
      if (isupper (*a))
        *a = tolower (*a);
        *a = tolower (*a);
      ++a;
      ++a;
    }
    }
 
 
  return ret;
  return ret;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.