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:
Wolfgang Sourdeau
2006-12-14 20:17:46 +00:00
parent 478481809b
commit bb8b9ad953
3 changed files with 30 additions and 2 deletions

View File

@@ -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

View File

@@ -36,6 +36,8 @@
- (NSString *) urlWithoutParameters;
- (NSString *) davMethodToObjC;
@end
#endif /* NSSTRING_URL_H */

View File

@@ -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