OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [string/] [strlwr.c] - Blame information for rev 645

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 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
_DEFUN (strlwr, (s),
38
        char *s)
39
{
40
  unsigned char *ucs = (unsigned char *) s;
41
  for ( ; *ucs != '\0'; ucs++)
42
    {
43
      *ucs = tolower(*ucs);
44
    }
45
  return s;
46
}

powered by: WebSVN 2.1.0

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