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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [string/] [strlwr.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/*
2
FUNCTION
3
        <<strlwr>>---force string to lowercase
4
 
5
INDEX
6
        strlwr
7
 
8
ANSI_SYNOPSIS
9
        #include <string.h>
10
        char *strlwr(char *<[a]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <string.h>
14
        char *strlwr(<[a]>)
15
        char *<[a]>;
16
 
17
DESCRIPTION
18
        <<strlwr>> converts each character in the string at <[a]> to
19
        lowercase.
20
 
21
RETURNS
22
        <<strlwr>> returns its argument, <[a]>.
23
 
24
PORTABILITY
25
<<strlwr>> is not widely portable.
26
 
27
<<strlwr>> requires no supporting OS subroutines.
28
 
29
QUICKREF
30
        strlwr
31
*/
32
 
33
#include <string.h>
34
#include <ctype.h>
35
 
36
char *
37
strlwr (a)
38
     char *a;
39
{
40
  char *ret = a;
41
 
42
  while (*a != '\0')
43
    {
44
      if (isupper (*a))
45
        *a = tolower (*a);
46
      ++a;
47
    }
48
 
49
  return ret;
50
}

powered by: WebSVN 2.1.0

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