mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
merge back reorganisation branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29615 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6bf6ec959b
commit
21d597e740
263 changed files with 5577 additions and 4170 deletions
|
@ -805,117 +805,6 @@ typedef NSUInteger NSStringEncodingConversionOptions;
|
|||
extern struct objc_class _NSConstantStringClassReference;
|
||||
#endif
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE, 011700)
|
||||
|
||||
/**
|
||||
* Provides some additional (non-standard) utility methods.
|
||||
*/
|
||||
@interface NSString (GSCategories)
|
||||
/**
|
||||
* Alternate way to invoke <code>stringWithFormat</code> if you have or wish
|
||||
* to build an explicit <code>va_list</code> structure.
|
||||
*/
|
||||
+ (id) stringWithFormat: (NSString*)format
|
||||
arguments: (va_list)argList;
|
||||
|
||||
/**
|
||||
* Returns a string formed by removing the prefix string from the
|
||||
* receiver. Raises an exception if the prefix is not present.
|
||||
*/
|
||||
- (NSString*) stringByDeletingPrefix: (NSString*)prefix;
|
||||
|
||||
/**
|
||||
* Returns a string formed by removing the suffix string from the
|
||||
* receiver. Raises an exception if the suffix is not present.
|
||||
*/
|
||||
- (NSString*) stringByDeletingSuffix: (NSString*)suffix;
|
||||
|
||||
/**
|
||||
* Returns a string formed by removing leading white space from the
|
||||
* receiver.
|
||||
*/
|
||||
- (NSString*) stringByTrimmingLeadSpaces;
|
||||
|
||||
/**
|
||||
* Returns a string formed by removing trailing white space from the
|
||||
* receiver.
|
||||
*/
|
||||
- (NSString*) stringByTrimmingTailSpaces;
|
||||
|
||||
/**
|
||||
* Returns a string formed by removing both leading and trailing
|
||||
* white space from the receiver.
|
||||
*/
|
||||
- (NSString*) stringByTrimmingSpaces;
|
||||
|
||||
/**
|
||||
* Returns a string in which any (and all) occurrences of
|
||||
* replace in the receiver have been replaced with by.
|
||||
* Returns the receiver if replace
|
||||
* does not occur within the receiver. NB. an empty string is
|
||||
* not considered to exist within the receiver.
|
||||
*/
|
||||
- (NSString*) stringByReplacingString: (NSString*)replace
|
||||
withString: (NSString*)by;
|
||||
@end
|
||||
|
||||
|
||||
/**
|
||||
* GNUstep specific (non-standard) additions to the NSMutableString class.
|
||||
*/
|
||||
@interface NSMutableString (GSCategories)
|
||||
|
||||
/**
|
||||
* Removes the specified suffix from the string. Raises an exception
|
||||
* if the suffix is not present.
|
||||
*/
|
||||
- (void) deleteSuffix: (NSString*)suffix;
|
||||
|
||||
/**
|
||||
* Removes the specified prefix from the string. Raises an exception
|
||||
* if the prefix is not present.
|
||||
*/
|
||||
- (void) deletePrefix: (NSString*)prefix;
|
||||
|
||||
/**
|
||||
* Returns a proxy to the receiver which will allow access to the
|
||||
* receiver as an NSString, but which will not allow any of the
|
||||
* extra NSMutableString methods to be used. You can use this method
|
||||
* to provide other code with read-only access to a mutable string
|
||||
* you own.
|
||||
*/
|
||||
- (NSString*) immutableProxy;
|
||||
|
||||
/**
|
||||
* Replaces all occurrences of the string replace with the string by
|
||||
* in the receiver.<br />
|
||||
* Has no effect if replace does not occur within the
|
||||
* receiver. NB. an empty string is not considered to exist within
|
||||
* the receiver.<br />
|
||||
* Calls - replaceOccurrencesOfString:withString:options:range: passing
|
||||
* zero for the options and a range from 0 with the length of the receiver.
|
||||
*/
|
||||
- (void) replaceString: (NSString*)replace
|
||||
withString: (NSString*)by;
|
||||
|
||||
/**
|
||||
* Removes all leading white space from the receiver.
|
||||
*/
|
||||
- (void) trimLeadSpaces;
|
||||
|
||||
/**
|
||||
* Removes all trailing white space from the receiver.
|
||||
*/
|
||||
- (void) trimTailSpaces;
|
||||
|
||||
/**
|
||||
* Removes all leading or trailing white space from the receiver.
|
||||
*/
|
||||
- (void) trimSpaces;
|
||||
@end
|
||||
|
||||
#endif /* GS_API_NONE */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue