Overview
Comment: | Rename -[length] to -[cStringLength] in OFString. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3ed599fe9834f58c14a785d8db3773a9 |
User & Date: | js on 2009-09-01 11:32:30 |
Other Links: | manifest | tags |
Context
2009-09-01
| ||
11:39 | Use OFMutableString in OFPlugin instead of doing it manually. check-in: cdfdea289e user: js tags: trunk | |
11:32 | Rename -[length] to -[cStringLength] in OFString. check-in: 3ed599fe98 user: js tags: trunk | |
2009-08-31
| ||
00:19 | Optimize OF_BSWAP64. check-in: 2ff4ae177d user: js tags: trunk | |
Changes
Modified src/OFMutableString.m from [c9b26460ed] to [c3c573eb68].
︙ | |||
318 319 320 321 322 323 324 | 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - - + + | } - replaceOccurrencesOfString: (OFString*)str withString: (OFString*)repl { const char *str_c = [str cString]; const char *repl_c = [repl cString]; |
︙ |
Modified src/OFPlugin.m from [773d6d11cf] to [e2e99b5635].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | { char *file; size_t pathlen, suffixlen; void *handle; OFPlugin *(*init_plugin)(); OFPlugin *plugin; |
︙ |
Modified src/OFStream.m from [4d39d4c3d2] to [ca6dc099de].
︙ | |||
201 202 203 204 205 206 207 | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - + | { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } - (size_t)writeString: (OFString*)str { |
︙ |
Modified src/OFString.h from [4c61fdeaf5] to [db05d342fe].
︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - + - + | /** * Creates a new OFString from a C string with the specified encoding and * length. * * \param str A C string to initialize the OFString with * \param encoding The encoding of the C string |
︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | - + - + | /** * Initializes an already allocated OFString from a C string with the specified * encoding and length. * * \param str A C string to initialize the OFString with * \param encoding The encoding of the C string |
︙ | |||
186 187 188 189 190 191 192 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - + - + | /** * \return The OFString as a UTF-8 encoded C string */ - (const char*)cString; /** |
︙ |
Modified src/OFString.m from [99eed6fe4d] to [e5d0b3d2f0].
︙ | |||
433 434 435 436 437 438 439 | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + | } - initWithString: (OFString*)str { self = [super init]; string = strdup([str cString]); |
︙ | |||
456 457 458 459 460 461 462 | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | - + | } - (const char*)cString { return string; } |
︙ | |||
506 507 508 509 510 511 512 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | - + - + | return hash; } - (size_t)indexOfFirstOccurrenceOfString: (OFString*)str { const char *str_c = [str cString]; |
︙ | |||
565 566 567 568 569 570 571 | 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 600 601 602 603 | - + - + - + | - (OFString*)stringByAppendingString: (OFString*)str { return [[OFMutableString stringWithString: self] appendString: str]; } - (BOOL)hasPrefix: (OFString*)prefix { |
︙ |
Modified src/OFXMLElement.m from [cf929b13b9] to [5595432660].
︙ | |||
122 123 124 125 126 127 128 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | - + - - + + - + - - + + - - + + | { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; char *str_c; size_t len, i, j, attrs_count; OFXMLAttribute **attrs_data; OFString *ret, *tmp; |
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + - - + + - - + + | for (j = 0; j < count; j++) append(tmp, @selector( appendCStringWithoutUTF8Checking:), [[data[j] string] cString]); } |
︙ |
Modified src/OFXMLParser.m from [7614e5646f] to [c146e3c2d9].
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + | if (buf[i] == '<') { len = i - last; if (len > 0) [cache appendCString: buf + last withLength: len]; |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + | size_t cache_len; len = i - last; if (len > 0) [cache appendCString: buf + last withLength: len]; cache_c = [cache cString]; |
︙ | |||
247 248 249 250 251 252 253 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + | size_t cache_len; len = i - last; if (len > 0) [cache appendCString: buf + last withLength: len]; cache_c = [cache cString]; |
︙ | |||
347 348 349 350 351 352 353 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | - + | len = i - last; if (len > 0) [cache appendCString: buf + last withLength: len]; cache_c = [cache cString]; |
︙ | |||
454 455 456 457 458 459 460 | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | - + | break; case OF_XMLPARSER_IN_COMMENT_4: if (buf[i] == '-') { size_t cache_len; [cache appendCString: buf + last withLength: i - last]; |
︙ |
Modified tests/OFString/OFString.m from [9c8a9cddc0] to [9cf2bd2fe4].
︙ | |||
84 85 86 87 88 89 90 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + | [s2 appendCString: "12"]; [s2 appendString: @"3"]; [s4 setToCString: [s2 cString]]; CHECK(![s2 compare: s4]) CHECK([[s1 appendString: s2] isEqual: @"test123"]) |
︙ |