/*************************************************************************
 * File Name: NSString+MiscPathComparing.h
 * Version  : 0.0 alpha
 * Date     : Tue 02-Sep-1997
 *************************************************************************
 *  COPYWHAT (C) 1997 by Tomi Engel
 *
 * This notice may not be removed from this source code.
 * The use and distribution of this software is governed by the
 * terms of the MiscKit license agreement.  Refer to the license
 * document included with the MiscKit distribution for the terms.
 *                    ALL RIGHTS RESERVED
 *
 *************************************************************************
 * Notes      :
 * Bugs       :
 * Author(s)  : tsengel
 * Last update: $Date: 1997/09/02 12:00:12 $
 * History    : $Log: NSString+MiscPathComparing.h,v $
 * History    : Revision 1.1  1997/09/02 12:00:12  tsengel
 * History    : Create category to add more convenience methods
 * History    :
 *************************************************************************/

#import "NSString+MiscPathComparing.h"

@implementation NSString (MiscPathComparing)

/*"
    These are conveninec methods for comparing pathes whicha re useful if an array of path string needs to be sorted by specific criteria.
"*/

- (NSComparisonResult)compareByPathExtension:(NSString *)otherPathString
{
    return [[self pathExtension] compare:[otherPathString pathExtension]];
}

- (NSComparisonResult)compareByLastPathComponent:(NSString *)otherPathString
{
    return [[self lastPathComponent] compare:[otherPathString lastPathComponent]];
}

// <<NOTE>>  what about a NSOBject generic... compareByValueForSelector:@selector()... hmm... but that can't be passed
// to the sorting mechanism...hmmm.

@end
