Differences From Artifact [90e49f1e77]:
- File
src/OFString.m
— part of check-in
[80ac05eb8f]
at
2017-11-14 23:19:06
on branch trunk
— Improve -[stringByAppendingPathComponent:]
This now prevents double slashes / backslashes. (user: js, size: 68846) [annotate] [blame] [check-ins using]
To Artifact [2722cbc855]:
- File src/OFString.m — part of check-in [ad18d4f976] at 2017-11-14 23:27:31 on branch trunk — Add -[OFString stringByAppendingURLPathComponent:] (user: js, size: 69174) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 | return [self stringByAppendingString: component]; else { OFMutableString *ret = [[self mutableCopy] autorelease]; [ret appendString: OF_PATH_DELIMITER_STRING]; [ret appendString: component]; [ret makeImmutable]; return ret; } } - (OFString *)stringByPrependingString: (OFString *)string | > > > > > > > > > > > > > > > > | 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 | return [self stringByAppendingString: component]; else { OFMutableString *ret = [[self mutableCopy] autorelease]; [ret appendString: OF_PATH_DELIMITER_STRING]; [ret appendString: component]; [ret makeImmutable]; return ret; } } - (OFString *)stringByAppendingURLPathComponent: (OFString *)component { if ([self hasSuffix: @"/"]) return [self stringByAppendingString: component]; else { OFMutableString *ret = [[self mutableCopy] autorelease]; [ret appendString: @"/"]; [ret appendString: component]; [ret makeImmutable]; return ret; } } - (OFString *)stringByPrependingString: (OFString *)string |
︙ | ︙ |