476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
|
}
- (void)setFragment: (OFString*)fragment_
{
OF_SETTER(fragment, fragment_, YES, YES)
}
- (OFString*)description
{
OFMutableString *ret = [OFMutableString stringWithFormat: @"%@://",
scheme];
BOOL needPort = YES;
if ([scheme isEqual: @"file"]) {
[ret appendString: path];
|
|
|
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
|
}
- (void)setFragment: (OFString*)fragment_
{
OF_SETTER(fragment, fragment_, YES, YES)
}
- (OFString*)string
{
OFMutableString *ret = [OFMutableString stringWithFormat: @"%@://",
scheme];
BOOL needPort = YES;
if ([scheme isEqual: @"file"]) {
[ret appendString: path];
|
520
521
522
523
524
525
526
527
|
* Class swizzle the string to be immutable. We declared the return type
* to be OFString*, so it can't be modified anyway. But not swizzling it
* would create a real copy each time -[copy] is called.
*/
ret->isa = [OFString class];
return ret;
}
@end
|
>
>
>
>
>
|
520
521
522
523
524
525
526
527
528
529
530
531
532
|
* Class swizzle the string to be immutable. We declared the return type
* to be OFString*, so it can't be modified anyway. But not swizzling it
* would create a real copy each time -[copy] is called.
*/
ret->isa = [OFString class];
return ret;
}
- (OFString*)description
{
return [self string];
}
@end
|