rendered paste body NSData *data = [NSData dataWithBytes:(const void *)buf length:len];
NSLog(@"DATA: %s", [data bytes]);
NSString *tmp = [[[NSString alloc] initWithBytes:buf length:len encoding:NSASCIIStringEncoding] autorelease];
NSLog(@"TMP: %@", tmp);
toProcess = [toProcess stringByAppendingString:tmp];
NSLog(@"toProcess: %@", toProcess);
if ([toProcess hasSuffix:@"}"]) {
NSLog(@"LINE: %@", toProcess);
toProcess = nil;
}
Results in:
(...)
11-06-04 14:26:27.710 GeeMtGoxTracker[90438:707] DATA: "
2011-06-04 14:26:27.743 Test[90438:707] TMP: "
2011-06-04 14:26:27.771 Test[90438:707] toProcess:
2011-06-04 14:26:27.865 Test[90438:707] DATA: }
2011-06-04 14:26:27.907 Test[90438:707] TMP: }
2011-06-04 14:26:27.932 Test[90438:707] toProcess:
2011-06-04 14:26:28.004 Test[90438:707] LINE: