︙ | | | ︙ | |
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
|
tableSize = middleTableSize;
}
if (c >> 8 < tableSize && table[c >> 8][c & 0xFF])
[self setCharacter: table[c >> 8][c & 0xFF]
atIndex: i];
switch (c) {
case ' ':
case '\t':
case '\n':
case '\r':
isStart = true;
break;
default:
isStart = false;
break;
}
}
objc_autoreleasePoolPop(pool);
}
#else
- (void)of_convertWithWordStartFunction: (char (*)(char))startFunction
wordMiddleFunction: (char (*)(char))middleFunction
|
<
<
<
<
<
|
<
<
<
<
<
|
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
tableSize = middleTableSize;
}
if (c >> 8 < tableSize && table[c >> 8][c & 0xFF])
[self setCharacter: table[c >> 8][c & 0xFF]
atIndex: i];
isStart = of_ascii_isspace(c);
}
objc_autoreleasePoolPop(pool);
}
#else
- (void)of_convertWithWordStartFunction: (char (*)(char))startFunction
wordMiddleFunction: (char (*)(char))middleFunction
|
︙ | | | ︙ | |
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
|
(isStart ? startFunction : middleFunction);;
of_unichar_t c = characters[i];
if (c <= 0x7F)
[self setCharacter: (int)function(c)
atIndex: i];
switch (c) {
case ' ':
case '\t':
case '\n':
case '\r':
isStart = true;
break;
default:
isStart = false;
break;
}
}
objc_autoreleasePoolPop(pool);
}
#endif
- (void)setCharacter: (of_unichar_t)character
|
<
<
<
<
<
|
<
<
<
<
<
|
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
|
(isStart ? startFunction : middleFunction);;
of_unichar_t c = characters[i];
if (c <= 0x7F)
[self setCharacter: (int)function(c)
atIndex: i];
isStart = of_ascii_isspace(c);
}
objc_autoreleasePoolPop(pool);
}
#endif
- (void)setCharacter: (of_unichar_t)character
|
︙ | | | ︙ | |
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
|
void *pool = objc_autoreleasePoolPush();
const of_unichar_t *characters = [self characters];
size_t i, length = [self length];
for (i = 0; i < length; i++) {
of_unichar_t c = characters[i];
if (c != ' ' && c != '\t' && c != '\n' && c != '\r' &&
c != '\f')
break;
}
objc_autoreleasePoolPop(pool);
[self deleteCharactersInRange: of_range(0, i)];
}
|
|
<
|
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
|
void *pool = objc_autoreleasePoolPush();
const of_unichar_t *characters = [self characters];
size_t i, length = [self length];
for (i = 0; i < length; i++) {
of_unichar_t c = characters[i];
if (!of_ascii_isspace(c))
break;
}
objc_autoreleasePoolPop(pool);
[self deleteCharactersInRange: of_range(0, i)];
}
|
︙ | | | ︙ | |
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
|
return;
pool = objc_autoreleasePoolPush();
characters = [self characters];
d = 0;
for (p = characters + length - 1; p >= characters; p--) {
if (*p != ' ' && *p != '\t' && *p != '\n' && *p != '\r' &&
*p != '\f')
break;
d++;
}
objc_autoreleasePoolPop(pool);
|
<
|
|
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
return;
pool = objc_autoreleasePoolPush();
characters = [self characters];
d = 0;
for (p = characters + length - 1; p >= characters; p--) {
if (!of_ascii_isspace(*p))
break;
d++;
}
objc_autoreleasePoolPop(pool);
|
︙ | | | ︙ | |