mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 14:28:52 +00:00
Monotone-Parent: be5a9d6f05d1e4ebc621787e18ea6e108e6c3c4b
Monotone-Revision: 80282be929ffeb0633515f55064386950eb0748d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-12-14T20:17:46 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2006-12-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSString+Utilities.[hm]: old "NSString+URL"
|
||||
renamed.
|
||||
([NSString -davMethodToObjC]): method that returns the method name
|
||||
for a DAV property implementation.
|
||||
|
||||
* SoObjects/SOGo/NSArray+Utilities.m: new extension module to
|
||||
NSArray.
|
||||
([NSArray -stringsWithFormat:format]): new method that returns
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
- (NSString *) urlWithoutParameters;
|
||||
|
||||
- (NSString *) davMethodToObjC;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* NSSTRING_URL_H */
|
||||
@@ -20,7 +20,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "NSString+URL.h"
|
||||
#import "NSString+Utilities.h"
|
||||
#import "NSDictionary+URL.h"
|
||||
|
||||
@implementation NSString (SOGoURLExtension)
|
||||
@@ -51,7 +51,10 @@
|
||||
NSRange hostR, locationR;
|
||||
|
||||
if ([self hasPrefix: @"/"])
|
||||
newURL = [self copy];
|
||||
{
|
||||
newURL = [self copy];
|
||||
[newURL autorelease];
|
||||
}
|
||||
else
|
||||
{
|
||||
hostR = [self rangeOfString: @"://"];
|
||||
@@ -77,4 +80,22 @@
|
||||
return newUrl;
|
||||
}
|
||||
|
||||
- (NSString *) davMethodToObjC
|
||||
{
|
||||
NSMutableString *newName;
|
||||
NSEnumerator *components;
|
||||
NSString *component;
|
||||
|
||||
newName = [NSMutableString stringWithString: @"dav"];
|
||||
components = [[self componentsSeparatedByString: @"-"] objectEnumerator];
|
||||
component = [components nextObject];
|
||||
while (component)
|
||||
{
|
||||
[newName appendString: [component capitalizedString]];
|
||||
component = [components nextObject];
|
||||
}
|
||||
|
||||
return newName;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user