Browse Source

minor modification of strtolower(), and implement strtoupper()

pre-master-46
rlar 16 years ago
parent
commit
2cdd98715a
  1. 5
      ChangeLog
  2. 20
      src/misc/string.c
  3. 1
      src/misc/stringutil.h

5
ChangeLog

@ -1,3 +1,8 @@
2010-11-04 Robert Larice
* src/misc/string.c ,
* src/misc/stringutil.h :
minor modification of strtolower(), and implement strtoupper()
2010-11-04 Robert Larice
* src/frontend/plotting/x11.c :
minor rewrite, fix a minor bug in the x11 zoom-in function

20
src/misc/string.c

@ -132,10 +132,22 @@ void
strtolower(char *str)
{
if (str)
while (*str) {
*str = tolower(*str);
str++;
}
while (*str) {
if(isupper(*str))
*str = (char) tolower(*str);
str++;
}
}
void
strtoupper(char *str)
{
if (str)
while (*str) {
if(islower(*str))
*str = (char) toupper(*str);
str++;
}
}
#ifdef CIDER

1
src/misc/stringutil.h

@ -18,6 +18,7 @@ int scannum(char *str);
int cieq(register char *p, register char *s);
int ciprefix(register char *p, register char *s);
void strtolower(char *str);
void strtoupper(char *str);
char * stripWhiteSpacesInsideParens(char *str);
char * gettok(char **s);
char * gettok_instance(char **);

Loading…
Cancel
Save