start « StringBuffer « Java Data Type Q&A





1. Get the index of the start of a newline in a Stringbuffer    stackoverflow.com

I need to get the starting position of new line when looping through a StringBuffer. Say I have the following document in a stringbuffer

"This is a test
Test
Testing Testing"
New lines exist after "test", ...