ok well looking at capitalize... I changed it to...
char *capitalize( const char *str )
{
static char strcap[MAX_STRING_LENGTH];
int i;
for( i = 0; str[i] != '\0'; i++ )
strcap[i] = str[i];
strcap[i] = '\0';
strcap[0] = UPPER( strcap[0] );
return strcap;
}
donno if it was smart to remove LOWER( str[i] ) but I did so my strings could have a Capital in the begining and more somewhere else in the string... Now what I want to do, is make something like this to check for periods and the like at the end of the string, and if there isn't a ?, !, or a period, to add a period at the end of the string, but I dont know how to do something like that.
char *capitalize( const char *str )
{
static char strcap[MAX_STRING_LENGTH];
int i;
for( i = 0; str[i] != '\0'; i++ )
strcap[i] = str[i];
strcap[i] = '\0';
strcap[0] = UPPER( strcap[0] );
return strcap;
}
donno if it was smart to remove LOWER( str[i] ) but I did so my strings could have a Capital in the begining and more somewhere else in the string... Now what I want to do, is make something like this to check for periods and the like at the end of the string, and if there isn't a ?, !, or a period, to add a period at the end of the string, but I dont know how to do something like that.