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 » Can we get a Join that uses WString?
Re: Can we get a Join that uses WString? [message #16252 is a reply to message #16239] Wed, 04 June 2008 00:40 Go to previous messageGo to previous message
phirox is currently offline  phirox
Messages: 49
Registered: December 2007
Member
I was a bit bored so did an attempt for a Split function:

Vector<WString> Split(const WString& im, const WString& delim) {
	Vector<WString> r;
	if(im.IsEmpty() || delim.IsEmpty()) return r;
	int n = 0, i = 0;
	while(n >= 0) {
		n = im.Find(delim, i);
		if(n >= 0) {
			r.Add(im.Mid(i, n-i));
			i = n + delim.GetLength();
		}
	}
	r.Add(im.Mid(i));
	return r;
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Suggest Xmlize support for Value
Next Topic: how can i use iterators with NTL?
Goto Forum:
  


Current Time: Mon May 20 06:08:37 CEST 2024

Total time taken to generate the page: 0.01877 seconds