/usr/include/GNUstep/NGExtensions/NSString+misc.h is in libsope-dev 2.2.17-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | /*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of SOPE.
SOPE is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
SOPE 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with SOPE; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef __NGExtensions_NSString_misc_H__
#define __NGExtensions_NSString_misc_H__
#import <Foundation/NSString.h>
@class NSSet, NSDictionary, NSString;
@interface NSObject(StringBindings)
- (NSString *)valueForStringBinding:(NSString *)_key;
@end
@interface NSString(misc)
/*
Replaces keys, which enclosed in '$', with values from _bindings. The values
are retrieved using the '-valueForStringBinding:' method which per default
use -valueForKey: and -objectForKey: for NSDictionary objects.
For using of $ escape it with $$.
Example:
source: @"du da blah $var$ doof"
dest = [source stringByReplacingVariablesWithBindings:
@{ var = @"dummy"; }];
=>
dest: @"du da blah dummy doof"
*/
- (NSString *)stringByReplacingVariablesWithBindings:(id)_bindings;
/*
If there are variables with no binding, _unkown is used instead.
If _unkown is nil and there are unknown bindings, an exception will be thrown.
*/
- (NSString *)stringByReplacingVariablesWithBindings:(id)_bindings
stringForUnknownBindings:(NSString *)_unknown;
/*
Returns all binding variables. ('aaa $doof$ $bla$' --> (doof, bla) )
*/
- (NSSet *)bindingVariables;
@end
@interface NSString(FilePathVersioningMethods)
/*
"/PATH/file.txt;1"
*/
- (NSString *)pathVersion;
- (NSString *)stringByDeletingPathVersion;
- (NSString *)stringByAppendingPathVersion:(NSString *)_version;
@end /* NSString(FilePathMethodsVersioning) */
@interface NSString(URLEscaping)
/*
These functions encode/decode HTTP style URL paths, which can escape
spaces and special chars.
Chars are escaped using the '%' hex-notation:
Encode:
'Hello World' => 'Hello%20World'
'& ?' => '%26%20%3F'
*/
- (BOOL)containsURLEscapeCharacters;
- (NSString *)stringByUnescapingURL;
- (NSString *)stringByEscapingURL;
@end
@interface NSString(HTMLEscaping)
- (NSString *)stringByEscapingHTMLString;
- (NSString *)stringByEscapingHTMLAttributeValue;
@end
@interface NSString(XMLEscaping)
- (NSString *)stringByEscapingXMLString;
- (NSString *)stringByEscapingXMLAttributeValue;
/*
The following methods work in "fully-qualified XML names", in this
format:
'{namespace}name'
*/
- (BOOL)xmlIsFQN;
- (NSString *)xmlNamespaceURI;
- (NSString *)xmlLocalName;
@end
@interface NSString(NGScanning)
/*
this methods search for a string, while skipping quotes, eg:
[@"abc '++' hello" rangeOfString:@"++" skipQuotes:@"\"'"];
would not return a result !
*/
- (NSRange)rangeOfString:(NSString *)_s
skipQuotes:(NSString *)_quotes
escapedByChar:(unichar)_escape;
- (NSRange)rangeOfString:(NSString *)_s skipQuotes:(NSString *)_quotes;
@end
@interface NSString(MailQuoting)
- (NSString *)stringByApplyingMailQuoting;
@end
#endif /* __NGExtensions_NSString_misc_H__ */
|