Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » IsUpper bug?
Re: IsUpper bug? [message #9549 is a reply to message #9543] Wed, 16 May 2007 11:55 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
unodgs wrote on Wed, 16 May 2007 03:00

I discovered that IsUpper for '_' return false. Because of that my function:
bool IsUpperString(const char *q)
{
	while(*q)
		if(!IsUpper(*q++))
		   return false;
	return true;
}

did not work well for strings like NUMBER_10_AND_20 and I had to modify it to:
bool IsUpperString(const char *q)
{
	while(*q)
	{
		if(*q != '_' && !IsUpper(*q))
		   return false;
		q++;
	}
	return true;
}




Of what letter is '_' uppercase variant?

I think the check should look like this

if(IsLetter(*q) && IsUpper(*q))


Mirek
 
Read Message
Read Message
Read Message
Previous Topic: Compile error "thread-local storage not supported ..."
Next Topic: Adding subclass objects to base class array using AppendPick()
Goto Forum:
  


Current Time: Mon Aug 25 11:14:09 CEST 2025

Total time taken to generate the page: 0.06174 seconds