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 » PatternMatchMulti problem
PatternMatchMulti problem [message #26993] Fri, 18 June 2010 13:33 Go to previous message
koldo is currently offline  koldo
Messages: 3443
Registered: August 2008
Senior Veteran
Hello all

Now PatternMatchMulti implementation is this:

bool PatternMatchMulti(const char *p, const char *s) {
	String pt;
	while(*p) {
		if(*p == ';' || *p == ',' || *p == ' ') {
			if(PatternMatch(pt, s)) return true;
			p++;
			while(*p == ';' || *p == ',' || *p == ' ') p++;
			pt.Clear();
		}
		else
			pt.Cat(*p++);
	}
	return pt.IsEmpty() ? false : PatternMatch(pt, s);
}


It separates patterns with ';', ',' and ' '. I thing to have patterns with spaces it would be better to remove the ' ' form the function.


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DeXml() incomplete
Next Topic: int64 formating
Goto Forum:
  


Current Time: Wed Aug 27 08:31:23 CEST 2025

Total time taken to generate the page: 0.10873 seconds