Differences From Artifact [d620b3bd51]:
- File
src/OFDictionary.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 16217) [annotate] [blame] [check-ins using]
To Artifact [3fca05019c]:
- File src/OFDictionary.m — part of check-in [2fafde4058] at 2017-06-25 17:13:29 on branch trunk — Add -[OFDictionary stringByURLEncoding] (user: js, size: 16917) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
558 559 560 561 562 563 564 565 566 567 568 569 570 571 | [ret appendString: @";\n"]; objc_autoreleasePoolPop(pool2); } [ret replaceOccurrencesOfString: @"\n" withString: @"\n\t"]; [ret appendString: @";\n}"]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 | [ret appendString: @";\n"]; objc_autoreleasePoolPop(pool2); } [ret replaceOccurrencesOfString: @"\n" withString: @"\n\t"]; [ret appendString: @";\n}"]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } - (OFString *)stringByURLEncoding { OFMutableString *ret = [OFMutableString string]; void *pool = objc_autoreleasePoolPush(); OFEnumerator *keyEnumerator = [self keyEnumerator]; OFEnumerator *objectEnumerator = [self objectEnumerator]; bool first = true; id key, object; while ((key = [keyEnumerator nextObject]) != nil && (object = [objectEnumerator nextObject]) != nil) { if OF_UNLIKELY (first) first = false; else [ret appendString: @"&"]; [ret appendString: [[key description] stringByURLEncoding]]; [ret appendString: @"="]; [ret appendString: [[object description] stringByURLEncoding]]; } [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } |
︙ | ︙ |