2012-03-21 12:41:27

Abel Gancsos
change string case in c

char *toLower(char a[])
{
int i=0;
char lower[linecount(a)-1];


while(i<(linecount(a)+2))
{

lower[i]=("%s",tolower(a[i]));

i++;
}
return ("%s",lower);
}

char *toUpper(char a[])
{
int i=0;
char lower[linecount(a)-1];
while(i<(linecount(a)+2))
{

lower[i]=("%s",toupper(a[i]));
i++;
}

return ("%s",lower);

}




TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!