Extracting lines from a buffer
Extracting lines from a buffer
- Subject: Extracting lines from a buffer
- From: Bruce Truax <email@hidden>
- Date: Wed, 28 Jul 2004 22:12:14 -0400
What is the easiest way to extract lines of text from a buffer. I thought
that was what
[stringBuffer getLineStart:&start
end:&end
contentsEnd:&contentsEnd
forRange:entireBufferRange];
Was supposed to do, but it always returns the entire range of buffer. What
I plan to do is use rangeOfString:options:range: to locate the "\n" first \n
character, create a range which goes from the first character of the buffer
to the value returned by rangeOfString:options:range: and extract the range
using substringWithRange: I am sure this will work, but I would think that
there is a simpler way.
Thanks.
Bruce
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.