mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
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:
parent
e1b32b96e9
commit
df92ce66a7
14 changed files with 526 additions and 190 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue