help with generic function
The following is an attempt at a generic uppercase function, not my code but im trying to understand it. I dont understand the garbagestring function, whats it most likely to be and say i had a string "hello" and wanted to use this function to 'uppercase it' what would i need to change?
thanks!
Code:
// --------------------------- UCase() function
char *UCase(char *);
char *UCase(char *UCaseString)
{
char *StrUCaseTmp;
int StrUCaseLen;
StrUCaseLen=strlen(UCaseString);
StrUCaseTmp=garbagestring(StrUCaseLen);
strncpy(StrUCaseTmp,UCaseString,StrUCaseLen);
StrUCaseTmp=strupr(StrUCaseTmp);
return StrUCaseTmp;
}