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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » DirectoryUp doesn't seem to work.
Re: DirectoryUp doesn't seem to work. [message #18723 is a reply to message #18573] Sat, 18 October 2008 19:34 Go to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
mr_ped wrote on Thu, 09 October 2008 10:11


But Mjrt has valid point about how it works right now, but I think the trailing slash should be handled as well.



String DirectoryUp(String& dir, bool basedir)
{
	while(*dir.Last() == '\\' || *dir.Last() == '/')
		dir.Trim(dir.GetCount() - 1);
	String s = dir;
	String name;


Like this?

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Drawing raw data to an Image / Draw object?
Next Topic: More small gems
Goto Forum:
  


Current Time: Sat Jun 07 16:10:00 CEST 2025

Total time taken to generate the page: 0.04742 seconds