Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6557 serge 1
/*
2
FUNCTION
3
	<>---force string to lowercase
4
 
5
INDEX
6
	strlwr
7
 
8
ANSI_SYNOPSIS
9
	#include 
10
	char *strlwr(char *<[a]>);
11
 
12
TRAD_SYNOPSIS
13
	#include 
14
	char *strlwr(<[a]>)
15
	char *<[a]>;
16
 
17
DESCRIPTION
18
	<> converts each character in the string at <[a]> to
19
	lowercase.
20
 
21
RETURNS
22
	<> returns its argument, <[a]>.
23
 
24
PORTABILITY
25
<> is not widely portable.
26
 
27
<> requires no supporting OS subroutines.
28
 
29
QUICKREF
30
	strlwr
31
*/
32
 
33
#include 
34
#include 
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
}