CocoaShare/Classes/Dropbox/DropboxSDK/NSString+Dropbox.m
2011-02-01 10:19:26 -06:00

24 lines
517 B
Objective-C

//
// NSString+Dropbox.m
// DropboxSDK
//
// Created by Brian Smith on 7/19/10.
// Copyright 2010 Dropbox, Inc. All rights reserved.
//
#import "NSString+Dropbox.h"
@implementation NSString (Dropbox)
- (NSString*)normalizedDropboxPath {
if ([self isEqual:@"/"]) return @"";
return [[self lowercaseString] precomposedStringWithCanonicalMapping];
}
- (BOOL)isEqualToDropboxPath:(NSString*)otherPath {
return [[self normalizedDropboxPath] isEqualToString:[otherPath normalizedDropboxPath]];
}
@end