mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-03 16:09:21 +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 parent
478481809b
commit
bb8b9ad953
3 files changed
+30
-2
No files matched your search
@@ -1,5 +1,10 @@
|
|||||||
2006-12-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
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
|
* SoObjects/SOGo/NSArray+Utilities.m: new extension module to
|
||||||
NSArray.
|
NSArray.
|
||||||
([NSArray -stringsWithFormat:format]): new method that returns
|
([NSArray -stringsWithFormat:format]): new method that returns
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
- (NSString *) urlWithoutParameters;
|
- (NSString *) urlWithoutParameters;
|
||||||
|
|
||||||
|
- (NSString *) davMethodToObjC;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* NSSTRING_URL_H */
|
#endif /* NSSTRING_URL_H */
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "NSString+URL.h"
|
#import "NSString+Utilities.h"
|
||||||
#import "NSDictionary+URL.h"
|
#import "NSDictionary+URL.h"
|
||||||
|
|
||||||
@implementation NSString (SOGoURLExtension)
|
@implementation NSString (SOGoURLExtension)
|
||||||
@@ -51,7 +51,10 @@
|
|||||||
NSRange hostR, locationR;
|
NSRange hostR, locationR;
|
||||||
|
|
||||||
if ([self hasPrefix: @"/"])
|
if ([self hasPrefix: @"/"])
|
||||||
newURL = [self copy];
|
{
|
||||||
|
newURL = [self copy];
|
||||||
|
[newURL autorelease];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hostR = [self rangeOfString: @"://"];
|
hostR = [self rangeOfString: @"://"];
|
||||||
@@ -77,4 +80,22 @@
|
|||||||
return newUrl;
|
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
|
@end
|
||||||
Reference in new issue
Block a user