string to upper / lower case.

had a quick search through the forum and OF code and was surprised that i couldn’t find a function for changing a string to upper or lower case.

so here are a couple small functions just for that… might be good to include in the Utils.

  
  
string testApp :: toUpperCase ( string str )  
{  
	string strUpper = "";  
	  
	for( int i=0; i<str.length(); i++ )  
	{  
		strUpper += toupper( str[ i ] );  
	}  
	  
	return strUpper;  
}  
  
string testApp :: toLowerCase ( string str )  
{  
	string strLower = "";  
	  
	for( int i=0; i<str.length(); i++ )  
	{  
		strLower += tolower( str[ i ] );  
	}  
	  
	return strLower;  
}  
  

L.