CocoaShare/Classes/Dropbox/DropboxSDK/NSString+Dropbox.m

24 lines
517 B
Mathematica
Raw Normal View History

2011-02-01 09:51:02 -06:00
//
// 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