mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 17:41:05 +00:00
([NSDictionary -description]): Implemented by Nathan Urban.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1533 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
615187e5df
commit
e3b3ecf55d
1 changed files with 14 additions and 2 deletions
|
@ -179,8 +179,20 @@ static Class NSMutableDictionary_concrete_class;
|
||||||
|
|
||||||
- (NSString*) description
|
- (NSString*) description
|
||||||
{
|
{
|
||||||
[self notImplemented:_cmd];
|
id desc;
|
||||||
return 0;
|
id keyenum = [self keyEnumerator];
|
||||||
|
id key;
|
||||||
|
int i;
|
||||||
|
desc = [NSMutableString stringWithCapacity:2];
|
||||||
|
[desc appendString:@"{"];
|
||||||
|
while(key = [keyenum nextObject]) { /* I wish appendString: returned self*/
|
||||||
|
[desc appendString:[key description]];
|
||||||
|
[desc appendString:@" = "];
|
||||||
|
[desc appendString:[[self objectForKey:key] description]];
|
||||||
|
[desc appendString:@"; "];
|
||||||
|
}
|
||||||
|
[desc appendString:@"}"];
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString*) descriptionWithIndent: (unsigned)level
|
- (NSString*) descriptionWithIndent: (unsigned)level
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue