Code example for BreakIterator

Methods: firstsetText

0
	public void addText(String newText)
	{ 
		// First, trim off up to old start. 
		buffer = buffer.substring(start);
		buffer += newText;
		bdry.setText(buffer);
		start = bdry.first();
	} 
 
	public void clearBuffer() 
	{ 
		buffer = "";
		bdry.setText(buffer);
		start = bdry.first();
	} 
 
	public String getNextSentence()
	{ 
		int end = bdry.next();
		String s = "";
		if (BreakIterator.DONE != end)