GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
mapcase.c
Go to the documentation of this file.
1
#include <grass/gis.h>
2
/*
3
* Map uppercase A-Z to lower case a-z
4
*
5
*/
6
7
19
char
*
G_tolcase
(
char
*
string
)
20
{
21
char
*p;
22
23
for
(p =
string
; *p; p++) {
24
/* convert to lower case */
25
if
(*p >=
'A'
&& *p <=
'Z'
)
26
*p -=
'A'
-
'a'
;
27
}
28
29
return
(
string
);
30
}
31
32
33
/*
34
* Map lowercase a-z to uppercase A-Z
35
*
36
*/
37
38
49
char
*
G_toucase
(
char
*
string
)
50
{
51
char
*p;
52
53
for
(p =
string
; *p; p++) {
54
/* convert to upper case */
55
if
(*p >=
'A'
&& *p <=
'z'
)
56
*p +=
'A'
-
'a'
;
57
}
58
59
return
(
string
);
60
}
G_tolcase
char * G_tolcase(char *string)
convert string to lower case
Definition:
mapcase.c:19
G_toucase
char * G_toucase(char *string)
convert string to upper case
Definition:
mapcase.c:49
lib
gis
mapcase.c
Generated on Sat Jan 2 2016 01:46:48 for GRASS Programmer's Manual by
1.8.5