description tidyups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6297 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2000-03-17 13:13:08 +00:00
parent e1b32b96e9
commit df92ce66a7
14 changed files with 526 additions and 190 deletions

View file

@ -176,6 +176,26 @@ static Class NSMutableAttributedString_concrete_class;
return nil;
}
- (NSString*) description
{
NSRange r = NSMakeRange(0, 0);
unsigned index = NSMaxRange(r);
unsigned length = [self length];
NSString *string = [self string];
NSDictionary *attrs;
NSMutableString *desc;
desc = AUTORELEASE([[super description] mutableCopy]);
while (index <= length &&
(attrs = [self attributesAtIndex: index effectiveRange: &r]) != nil)
{
index = NSMaxRange(r);
[desc appendFormat: @"\nRange: %@ Chars:'%@' Attrs: %@",
NSStringFromRange(r), [string substringFromRange: r], attrs];
}
return desc;
}
//Retrieving character information
- (unsigned int) length
{