Overview
Comment: | Remove -[prependString:] and -[reverse] |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6c3ec63d96ac743b298ea145d6859c59 |
User & Date: | js on 2022-09-04 18:46:17 |
Other Links: | manifest | tags |
Context
2022-09-04
| ||
18:54 | Fix typo check-in: 81f0ea5081 user: js tags: trunk | |
18:46 | Remove -[prependString:] and -[reverse] check-in: 6c3ec63d96 user: js tags: trunk | |
18:27 | Remove -[OFString stringByPrependingString:] check-in: 114576fe94 user: js tags: trunk | |
Changes
Modified src/OFArray.m from [b356d7c687] to [c89de989b4].
︙ | ︙ | |||
531 532 533 534 535 536 537 | if (self.count == 0) return @"()"; pool = objc_autoreleasePoolPush(); ret = [[self componentsJoinedByString: @",\n"] mutableCopy]; @try { | | | 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | if (self.count == 0) return @"()"; pool = objc_autoreleasePoolPush(); ret = [[self componentsJoinedByString: @",\n"] mutableCopy]; @try { [ret insertString: @"(\n" atIndex: 0]; [ret replaceOccurrencesOfString: @"\n" withString: @"\n\t"]; [ret appendString: @"\n)"]; } @catch (id e) { [ret release]; @throw e; } |
︙ | ︙ |
Modified src/OFINICategory.m from [a3ae5f50aa] to [1db2d24df3].
︙ | ︙ | |||
54 55 56 57 58 59 60 | [mutableString replaceOccurrencesOfString: @"\\" withString: @"\\\\"]; [mutableString replaceOccurrencesOfString: @"\f" withString: @"\\f"]; [mutableString replaceOccurrencesOfString: @"\r" withString: @"\\r"]; [mutableString replaceOccurrencesOfString: @"\n" withString: @"\\n"]; [mutableString replaceOccurrencesOfString: @"\"" withString: @"\\\""]; | | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | [mutableString replaceOccurrencesOfString: @"\\" withString: @"\\\\"]; [mutableString replaceOccurrencesOfString: @"\f" withString: @"\\f"]; [mutableString replaceOccurrencesOfString: @"\r" withString: @"\\r"]; [mutableString replaceOccurrencesOfString: @"\n" withString: @"\\n"]; [mutableString replaceOccurrencesOfString: @"\"" withString: @"\\\""]; [mutableString insertString: @"\"" atIndex: 0]; [mutableString appendString: @"\""]; [mutableString makeImmutable]; return mutableString; } |
︙ | ︙ |
Modified src/OFMutableString.h from [9300a1f2cf] to [91a3b5acd2].
︙ | ︙ | |||
107 108 109 110 111 112 113 | * `const OFUnichar *`. * * @param format A format string which generates the string to append * @param arguments The arguments used in the format string */ - (void)appendFormat: (OFConstantString *)format arguments: (va_list)arguments; | < < < < < < < < < < < < | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | * `const OFUnichar *`. * * @param format A format string which generates the string to append * @param arguments The arguments used in the format string */ - (void)appendFormat: (OFConstantString *)format arguments: (va_list)arguments; /** * @brief Converts the string to uppercase. */ - (void)uppercase; /** * @brief Converts the string to lowercase. |
︙ | ︙ |
Modified src/OFMutableString.m from [538b23eb1a] to [b626e8ca80].
︙ | ︙ | |||
368 369 370 371 372 373 374 | @try { [self appendUTF8String: UTF8String length: UTF8StringLength]; } @finally { free(UTF8String); } } | < < < < < < < < < < < < < < < < | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | @try { [self appendUTF8String: UTF8String length: UTF8StringLength]; } @finally { free(UTF8String); } } #ifdef OF_HAVE_UNICODE_TABLES - (void)uppercase { [self of_convertWithWordStartTable: OFUnicodeUppercaseTable wordMiddleTable: OFUnicodeUppercaseTable wordStartTableSize: OFUnicodeUppercaseTableSize wordMiddleTableSize: OFUnicodeUppercaseTableSize]; |
︙ | ︙ |
Modified src/OFMutableUTF8String.m from [e069c57766] to [57e4df0b5d].
︙ | ︙ | |||
421 422 423 424 425 426 427 | @try { [self appendUTF8String: UTF8String length: UTF8StringLength]; } @finally { free(UTF8String); } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | @try { [self appendUTF8String: UTF8String length: UTF8StringLength]; } @finally { free(UTF8String); } } - (void)insertString: (OFString *)string atIndex: (size_t)idx { size_t newCStringLength; if (idx > _s->length) @throw [OFOutOfRangeException exception]; |
︙ | ︙ |
Modified src/OFString.m from [9ff5525c3f] to [c20b83a313].
︙ | ︙ | |||
1752 1753 1754 1755 1756 1757 1758 | if (options & OFJSONRepresentationOptionIsIdentifier) { const char *cString = self.UTF8String; if ((!OFASCIIIsAlpha(cString[0]) && cString[0] != '_' && cString[0] != '$') || strpbrk(cString, " \n\r\t\b\f\\\"'") != NULL) { | | | | | 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 | if (options & OFJSONRepresentationOptionIsIdentifier) { const char *cString = self.UTF8String; if ((!OFASCIIIsAlpha(cString[0]) && cString[0] != '_' && cString[0] != '$') || strpbrk(cString, " \n\r\t\b\f\\\"'") != NULL) { [JSON insertString: @"\"" atIndex: 0]; [JSON appendString: @"\""]; } } else { [JSON insertString: @"\"" atIndex: 0]; [JSON appendString: @"\""]; } } else { [JSON replaceOccurrencesOfString: @"\n" withString: @"\\n"]; [JSON insertString: @"\"" atIndex: 0]; [JSON appendString: @"\""]; } [JSON makeImmutable]; return JSON; } |
︙ | ︙ |
Modified src/OFSystemInfo.m from [22395c80f5] to [08b6db7f62].
︙ | ︙ | |||
397 398 399 400 401 402 403 | OFDictionary *env = [OFApplication environment]; OFString *home; if ((home = [env objectForKey: @"HOME"]) == nil) return nil; [path deleteCharactersInRange: OFMakeRange(0, 1)]; | | | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | OFDictionary *env = [OFApplication environment]; OFString *home; if ((home = [env objectForKey: @"HOME"]) == nil) return nil; [path deleteCharactersInRange: OFMakeRange(0, 1)]; [path insertString: home atIndex: 0]; } [path makeImmutable]; return [OFURL fileURLWithPath: path isDirectory: true]; # elif defined(OF_WINDOWS) OFDictionary *env = [OFApplication environment]; |
︙ | ︙ | |||
486 487 488 489 490 491 492 | OFDictionary *env = [OFApplication environment]; OFString *home; if ((home = [env objectForKey: @"HOME"]) == nil) return nil; [path deleteCharactersInRange: OFMakeRange(0, 1)]; | | | 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | OFDictionary *env = [OFApplication environment]; OFString *home; if ((home = [env objectForKey: @"HOME"]) == nil) return nil; [path deleteCharactersInRange: OFMakeRange(0, 1)]; [path insertString: home atIndex: 0]; } [path appendString: @"/Preferences"]; [path makeImmutable]; return [OFURL fileURLWithPath: path isDirectory: true]; # elif defined(OF_WINDOWS) |
︙ | ︙ |
Modified src/platform/Windows/OFSubprocess.m from [0ef8b1e769] to [4951913bf9].
︙ | ︙ | |||
151 152 153 154 155 156 157 | [OFMutableString stringWithString: programName]; [argumentsString replaceOccurrencesOfString: @"\\\"" withString: @"\\\\\""]; [argumentsString replaceOccurrencesOfString: @"\"" withString: @"\\\""]; if ([argumentsString containsString: @" "]) { | | | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | [OFMutableString stringWithString: programName]; [argumentsString replaceOccurrencesOfString: @"\\\"" withString: @"\\\\\""]; [argumentsString replaceOccurrencesOfString: @"\"" withString: @"\\\""]; if ([argumentsString containsString: @" "]) { [argumentsString insertString: @"\"" atIndex: 0]; [argumentsString appendString: @"\""]; } for (OFString *argument in arguments) { OFMutableString *tmp = [[argument mutableCopy] autorelease]; bool containsSpaces = [tmp containsString: @" "]; |
︙ | ︙ |
Modified tests/OFStringTests.m from [9bcae0600b] to [cdfdf23d3d].
︙ | ︙ | |||
290 291 292 293 294 295 296 | [mutableString1 characterAtIndex: 1] == 0xE4 && [mutableString1 characterAtIndex: 3] == 0x20AC && [mutableString1 characterAtIndex: 5] == 0x1D11E) EXPECT_EXCEPTION(@"Detect out of range in -[characterAtIndex:]", OFOutOfRangeException, [mutableString1 characterAtIndex: 7]) | < < < | | | | | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | [mutableString1 characterAtIndex: 1] == 0xE4 && [mutableString1 characterAtIndex: 3] == 0x20AC && [mutableString1 characterAtIndex: 5] == 0x1D11E) EXPECT_EXCEPTION(@"Detect out of range in -[characterAtIndex:]", OFOutOfRangeException, [mutableString1 characterAtIndex: 7]) mutableString2 = [mutableStringClass stringWithString: @"abc"]; #ifdef OF_HAVE_UNICODE_TABLES TEST(@"-[uppercase]", R([mutableString1 uppercase]) && [mutableString1 isEqual: @"TÄS€1𝄞3"] && R([mutableString2 uppercase]) && [mutableString2 isEqual: @"ABC"]) TEST(@"-[lowercase]", R([mutableString1 lowercase]) && [mutableString1 isEqual: @"täs€1𝄞3"] && R([mutableString2 lowercase]) && [mutableString2 isEqual: @"abc"]) TEST(@"-[uppercaseString]", [[mutableString1 uppercaseString] isEqual: @"TÄS€1𝄞3"]) TEST(@"-[lowercaseString]", R([mutableString1 uppercase]) && [[mutableString1 lowercaseString] isEqual: @"täs€1𝄞3"]) TEST(@"-[capitalizedString]", [C(@"džbla tdžst TDŽST").capitalizedString isEqual: @"Džbla Tdžst Tdžst"]) #else TEST(@"-[uppercase]", R([mutableString1 uppercase]) && [mutableString1 isEqual: @"3𝄞1€SäT"] && R([mutableString2 uppercase]) && [mutableString2 isEqual: @"ABC"]) |
︙ | ︙ | |||
543 544 545 546 547 548 549 | EXPECT_EXCEPTION(@"Detect out of range in -[substringWithRange:] #2", OFOutOfRangeException, [C(@"𝄞öö") substringWithRange: OFMakeRange(4, 0)]) TEST(@"-[stringByAppendingString:]", [[C(@"foo") stringByAppendingString: @"bar"] isEqual: @"foobar"]) | < < < | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | EXPECT_EXCEPTION(@"Detect out of range in -[substringWithRange:] #2", OFOutOfRangeException, [C(@"𝄞öö") substringWithRange: OFMakeRange(4, 0)]) TEST(@"-[stringByAppendingString:]", [[C(@"foo") stringByAppendingString: @"bar"] isEqual: @"foobar"]) #ifdef OF_HAVE_FILES # if defined(OF_WINDOWS) TEST(@"-[isAbsolutePath]", C(@"C:\\foo").absolutePath && C(@"a:/foo").absolutePath && !C(@"foo").absolutePath && !C(@"b:foo").absolutePath && C(@"\\\\foo").absolutePath) # elif defined(OF_MSDOS) |
︙ | ︙ |