2007-01-31 18:12:33 +01:00
|
|
|
/* NSString+Utilities.h - this file is part of SOGo
|
2006-07-11 19:29:09 +02:00
|
|
|
*
|
2010-12-29 14:01:16 +01:00
|
|
|
* Copyright (C) 2006-2011 Inverse inc.
|
2006-07-11 19:29:09 +02:00
|
|
|
*
|
|
|
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-12-29 14:01:16 +01:00
|
|
|
* Ludovic Marcotte <lmarcotte@inverse.ca>
|
2006-07-11 19:29:09 +02:00
|
|
|
*
|
|
|
|
* This file is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This file is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NSSTRING_URL_H
|
|
|
|
#define NSSTRING_URL_H
|
|
|
|
|
|
|
|
#import <Foundation/NSString.h>
|
|
|
|
|
|
|
|
@class NSDictionary;
|
2010-10-26 20:20:46 +02:00
|
|
|
@class NSObject;
|
2006-07-11 19:29:09 +02:00
|
|
|
|
|
|
|
@interface NSString (SOGoURLExtension)
|
|
|
|
|
|
|
|
- (NSString *) composeURLWithAction: (NSString *) action
|
|
|
|
parameters: (NSDictionary *) urlParameters
|
|
|
|
andHash: (BOOL) useHash;
|
2006-07-29 00:43:28 +02:00
|
|
|
- (NSString *) hostlessURL;
|
|
|
|
|
2006-10-03 18:09:43 +02:00
|
|
|
- (NSString *) urlWithoutParameters;
|
|
|
|
|
2007-05-15 22:52:01 +02:00
|
|
|
- (NSString *) stringByDetectingURLs;
|
|
|
|
|
2009-01-07 17:45:15 +01:00
|
|
|
- (NSString *) doubleQuotedString;
|
|
|
|
|
2007-05-25 19:30:24 +02:00
|
|
|
- (NSString *) jsonRepresentation;
|
|
|
|
|
2009-01-16 16:33:07 +01:00
|
|
|
- (NSString *) asCSSIdentifier;
|
2010-01-05 23:34:35 +01:00
|
|
|
- (NSString *) fromCSSIdentifier;
|
2009-01-16 16:33:07 +01:00
|
|
|
|
2007-08-09 22:59:30 +02:00
|
|
|
/* bare email addresses */
|
|
|
|
- (NSString *) pureEMailAddress;
|
|
|
|
|
2007-08-24 00:10:50 +02:00
|
|
|
- (NSString *) asQPSubjectString: (NSString *) encoding;
|
|
|
|
|
2008-02-14 18:31:23 +01:00
|
|
|
- (NSRange) _rangeOfURLInRange: (NSRange) refRange;
|
|
|
|
|
2008-08-21 21:17:38 +02:00
|
|
|
- (BOOL) caseInsensitiveMatches: (NSString *) match;
|
|
|
|
|
2007-04-11 21:38:06 +02:00
|
|
|
#ifndef GNUSTEP_BASE_LIBRARY
|
2007-04-11 21:33:25 +02:00
|
|
|
- (BOOL) boolValue;
|
|
|
|
#endif
|
|
|
|
|
2009-11-29 05:19:32 +01:00
|
|
|
- (int) timeValue;
|
|
|
|
|
2009-09-09 15:31:45 +02:00
|
|
|
- (BOOL) _isLDIFSafe;
|
|
|
|
|
2009-11-19 00:16:15 +01:00
|
|
|
- (BOOL) isJSONString;
|
|
|
|
|
2010-10-26 20:20:46 +02:00
|
|
|
- (id) objectFromJSONString;
|
|
|
|
|
2011-02-02 02:58:56 +01:00
|
|
|
- (NSString *) asCryptStringUsingSalt: (NSString *) theSalt;
|
2010-12-29 14:01:16 +01:00
|
|
|
- (NSString *) asMD5String;
|
|
|
|
- (NSString *) asSHA1String;
|
|
|
|
|
2011-06-16 16:38:14 +02:00
|
|
|
- (NSString *) asSafeSQLString;
|
2010-12-29 14:01:16 +01:00
|
|
|
|
2011-07-19 22:01:13 +02:00
|
|
|
- (NSUInteger) countOccurrencesOfString: (NSString *) substring;
|
|
|
|
|
2006-07-11 19:29:09 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* NSSTRING_URL_H */
|