URL
https://opencores.org/ocsvn/or1k/or1k/trunk
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;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.