• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Extracting lines from a buffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Extracting lines from a buffer
      • From: Pandaa <email@hidden>
    • Re: Extracting lines from a buffer
      • From: m <email@hidden>
  • Prev by Date: "Single Window" to Doc Based App?
  • Next by Date: Re: Extracting lines from a buffer
  • Previous by thread: "Single Window" to Doc Based App?
  • Next by thread: Re: Extracting lines from a buffer
  • Index(es):
    • Date
    • Thread