-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNSArray+Ca.m
More file actions
41 lines (30 loc) · 868 Bytes
/
NSArray+Ca.m
File metadata and controls
41 lines (30 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// NSArray+Ca.m
// test
//
// Created by xiaozhenyang on 15/9/7.
// Copyright (c) 2015年 yitian. All rights reserved.
//
#import "NSArray+Ca.h"
@implementation NSArray (Ca)
- (NSString*)descriptionWithLocale:(id)locale
{
NSMutableString* strM = [NSMutableString stringWithString:@"(\n"];
[self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL* stop) {
[strM appendFormat:@"\t%@,\n", obj];
}];
[strM appendString:@")"];
return strM;
}
@end
@implementation NSDictionary (Log)
- (NSString*)descriptionWithLocale:(id)locale
{
NSMutableString* strM = [NSMutableString stringWithString:@"{\n"];
[self enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL* stop) {
[strM appendFormat:@"\t%@ = %@;\n", key, obj];
}];
[strM appendString:@"}\n"];
return strM;
}
@end