Name
lower — convert a string to lower case
Synopsis
string lower(
str)
;
string
str
;
Description
Returns str with all upper case
characters converted to lower case.
Example 38. lower
Example
// A function to perform a case insensitive comparison by converting both
// strings to lower case and then comparing
function strcmp(string s1, string s2)
{
s1 = lower(s1);
s2 = lower(s2);
if(s1 == s2)
return 0;
else if(s1 < s2)
return -1;
else
return 1;
}
See Also
This function complements the upper()
function.