Commit fff61924 authored by peter@mysql.com's avatar peter@mysql.com

Merge pzaitsev@work.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/pz/mysql/mysql-4.0-root
parents 68360dc1 e33ac1e3
......@@ -28,7 +28,21 @@
#include <m_string.h>
#endif
/* string to uppercase */
/*
Upcase string
SYNOPSIS
str IN/OUT String to upcase
RETURN VALUE
none
DESCRIPTION
Function changes input parameter so all chars it consist from
are replaced with matching one in upper case.
String should be writable with exception read-only empty string
constant is handled correctly.
*/
void caseup_str(my_string str)
{
......@@ -45,11 +59,29 @@ void caseup_str(my_string str)
}
else
#endif
while ((*str = toupper(*str)) != 0)
while (*str!=0) /* iterate till the end of string */
{
*str= toupper(*str);
str++;
}
} /* caseup_str */
/* string to lowercase */
/*
Downcase string
SYNOPSIS
str IN/OUT String to downcase
RETURN VALUE
none
DESCRIPTION
Function changes input parameter so all chars it consist from
are replaced with matching one in lower case.
String should be writable with exception read-only empty string
constant is handled correctly.
*/
void casedn_str(my_string str)
{
......@@ -66,8 +98,11 @@ void casedn_str(my_string str)
}
else
#endif
while ((*str= tolower(*str)) != 0)
while (*str!=0) /* iterate till the end of string */
{
*str= tolower(*str);
str++;
}
} /* casedn_str */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment