Differences From Artifact [0ce80cb81c]:
- File src/OFString.m — part of check-in [4f2b0f0847] at 2017-11-13 21:56:37 on branch trunk — Add -[OFString indexOfCharacterFromSet:] (user: js, size: 68781) [annotate] [blame] [check-ins using]
To 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]
︙ | ︙ | |||
2043 2044 2045 2046 2047 2048 2049 | [new makeImmutable]; return new; } - (OFString *)stringByAppendingPathComponent: (OFString *)component { | | > > | | | | | | > | 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 | [new makeImmutable]; return new; } - (OFString *)stringByAppendingPathComponent: (OFString *)component { if ([self hasSuffix: OF_PATH_DELIMITER_STRING]) 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 { OFMutableString *new = [[string mutableCopy] autorelease]; [new appendString: self]; |
︙ | ︙ |