GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
case.c
Go to the documentation of this file.
1
#include <grass/dbmi.h>
2
9
void
db_char_to_lowercase
(
char
*
s
)
10
{
11
if
(*s >=
'A'
&& *s <=
'Z'
)
12
*s -=
'A'
-
'a'
;
13
}
14
21
void
db_char_to_uppercase
(
char
*
s
)
22
{
23
if
(*s >=
'a'
&& *s <=
'z'
)
24
*s +=
'A'
-
'a'
;
25
}
26
33
void
db_Cstring_to_lowercase
(
char
*
s
)
34
{
35
while
(*s)
36
db_char_to_lowercase
(s++);
37
}
38
45
void
db_Cstring_to_uppercase
(
char
*
s
)
46
{
47
while
(*s)
48
db_char_to_uppercase
(s++);
49
}
50
57
int
db_nocase_compare
(
const
char
*a,
const
char
*
b
)
58
{
59
char
s
, t;
60
61
while
(*a && *b) {
62
s = *a++;
63
t = *b++;
64
db_char_to_uppercase
(&s);
65
db_char_to_uppercase
(&t);
66
if
(s != t)
67
return
0;
68
}
69
return
(*a == 0 && *b == 0);
70
}
lib
db
dbmi_base
case.c
Generated on Wed Jun 6 2012 14:04:19 for GRASS Programmer's Manual by
1.8.1