#include <OldSchoolPropertyListWriting.h>
◆ oldSchoolPListFormatWithIndentation:errorDescription:
| - (NSString *) oldSchoolPListFormatWithIndentation: |
|
(unsigned) | inIndentation |
| errorDescription: |
|
(NSString**) | outErrorDescription |
|
implementation |
Reimplemented from <OldSchoolPropertyListWriting>.
Definition at line 89 of file OldSchoolPropertyListWriting.m.
89 :(unsigned)inIndentation errorDescription:(NSString**)outErrorDescription
90{
91 NSString* result;
92 double dVal;
93
94 if ([self oo_isBoolean]) {
95 if ([self boolValue])
96 result = @"true";
97 else
98 result = @"false";
99 } else if ([self oo_isFloatingPointNumber]) {
100 dVal = [self doubleValue];
101 result = [NSString stringWithFormat:@"%.8g", dVal];
102 } else
103 result = [NSString stringWithFormat:@"%@", self];
104
105
106#if 0
107 if ([result isEqual:@"inf"] || [result isEqual:@"-inf"])
108 {
109 *outErrorDescription = @"infinities cannot be represented in old-school property lists";
111 }
112#endif
113
114 return result;
115}
References nil.
The documentation for this category was generated from the following files: