I have a question on how i can limit the amount of a string that is printed out in java. For instance i want something like this:
Orignal String:
“In the long history of the world,
only a few generations have been
granted the role of defending freedom
in its hour of maximum danger. I do
not shrink from this responsibility –
I welcome it. “
I want this:
“In the long history of the world,
only a few generations have been
granted the role of defending freedom
in its hour of maximum…”
Use a java.text.BreakIterator, something like this: