1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
|
return [[OFData dataWithItemsNoCopy: buffer
count: _s->length + 1
itemSize: sizeof(OFChar32)
freeWhenDone: true] items];
}
#ifdef OF_HAVE_BLOCKS
- (void)enumerateLinesUsingBlock: (of_string_line_enumeration_block_t)block
{
void *pool;
const char *cString = _s->cString;
const char *last = cString;
bool stop = false, lastCarriageReturn = false;
while (!stop && *cString != 0) {
|
|
|
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
|
return [[OFData dataWithItemsNoCopy: buffer
count: _s->length + 1
itemSize: sizeof(OFChar32)
freeWhenDone: true] items];
}
#ifdef OF_HAVE_BLOCKS
- (void)enumerateLinesUsingBlock: (OFStringLineEnumerationBlock)block
{
void *pool;
const char *cString = _s->cString;
const char *last = cString;
bool stop = false, lastCarriageReturn = false;
while (!stop && *cString != 0) {
|