File: programming/cocoa/ PartialPaths.m

//  NSString+PathCombiningExtensions.m
//  VerpackIt
//  Created by Uli Kusterer on 18.09.04.
//  Copyright 2004 M. Uli Kusterer. All rights reserved.
#import "NSString+PartialPaths.h"
"/"] )	// Remove any trailing slashes that might screw up removal.
"/"] )	// Absolute path! No need for relativity.
"../"] )	// Relative path goes up? Do that.
"/" options: NSBackwardsSearch];
		endRange.length = [base length] -endRange.location;	// This includes the slash.
// Remove last item and its slash.
"/"];	// Re-insert trailing slash.
'/'"/"// Can't swap basePath and self here, or we could run afoul of decomposed char sequences.
"/"'/'"../""../"// can't cope if it's in the middle. Also covers NSNotFound.

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.