diff --git a/Documentation/Base.gsdoc b/Documentation/Base.gsdoc
index 4bd901ac2..179336116 100644
--- a/Documentation/Base.gsdoc
+++ b/Documentation/Base.gsdoc
@@ -61,6 +61,17 @@
specification are made available in the headers.
+
+ NB These preprocessor constants are used in
+ developer code (ie the code that users of GNUstep write)
+ rather than by the GNUstep software itsself. They permit a
+ developer to ensure that he/she does not write code which depends
+ upon API not present on other implementations (in practice,
+ MacOS-X or some old OPENSTEP systems).
+ The actual GNUstep libraries are always built with the full
+ GNUstep API in place, so that the feature set is as consistent
+ as possible.
+
User defaults
diff --git a/Source/NSString.m b/Source/NSString.m
index f1ded640a..e4b55f412 100644
--- a/Source/NSString.m
+++ b/Source/NSString.m
@@ -1918,13 +1918,13 @@ handle_printf_atsign (FILE *stream,
* - U+000D (carriage return)
* - U+2028 (Unicode line separator)
* - U+2029 (Unicode paragraph separator)
- * - U+000D U+000A (CRLF
+ * - U+000D U+000A (CRLF)
*
* The index of the first character of the line at or before aRange is
* returned in startIndex.
* The index of the first character of the next line after the line terminator
* is returned in endIndex.
- * The index of the last character bfore the line terminator is returned
+ * The index of the last character before the line terminator is returned
* contentsEndIndex.
* Raises an NSRangeException if the range is invalid, but permits the index
* arguments to be null pointers (in which case no value is returned in that
@@ -4103,7 +4103,7 @@ handle_printf_atsign (FILE *stream,
- (NSString*) stringByRemovingSuffix: (NSString*)suffix
{
NSCAssert2([self hasSuffix: suffix],
- @"'%@' has not the suffix '%@'", self, suffix);
+ @"'%@' does not have the suffix '%@'", self, suffix);
return [self substringToIndex: ([self length] - [suffix length])];
}
@@ -4114,7 +4114,7 @@ handle_printf_atsign (FILE *stream,
- (NSString*) stringByRemovingPrefix: (NSString*)prefix
{
NSCAssert2([self hasPrefix: prefix],
- @"'%@' has not the prefix '%@'", self, prefix);
+ @"'%@' does not have the prefix '%@'", self, prefix);
return [self substringFromIndex: [prefix length]];
}
@@ -4278,7 +4278,7 @@ handle_printf_atsign (FILE *stream,
- (void) removeSuffix: (NSString*)suffix
{
NSCAssert2([self hasSuffix: suffix],
- @"'%@' has not the suffix '%@'", self, suffix);
+ @"'%@' does not have the suffix '%@'", self, suffix);
[self deleteCharactersInRange:
NSMakeRange([self length] - [suffix length], [suffix length])];
}
@@ -4290,7 +4290,7 @@ handle_printf_atsign (FILE *stream,
- (void) removePrefix: (NSString*)prefix;
{
NSCAssert2([self hasPrefix: prefix],
- @"'%@' has not the prefix '%@'", self, prefix);
+ @"'%@' does not have the prefix '%@'", self, prefix);
[self deleteCharactersInRange: NSMakeRange(0, [prefix length])];
}
@@ -4361,12 +4361,8 @@ handle_printf_atsign (FILE *stream,
unichar (*caiImp)(NSString*, SEL, unsigned int);
caiImp = (unichar (*)())[self methodForSelector: caiSel];
- while (end > 0)
+ while (end > 0 && isspace((*caiImp)(self, caiSel, end - 1)))
{
- if (!isspace((*caiImp)(self, caiSel, end - 1)))
- {
- break;
- }
end--;
}
if (end < length)