NOTA: La traducción de esta documentación es un esfuerzo personal y voluntario, no es un documento oficial de Sun Microsystems ni Oracle ni está patrocinado por ninguna de estas empresas. Los documentos originales (en inglés) están disponibles en: http://java.sun.com/docs/books/tutorial/.
Dirija cualquier comentario, petición, felicitación, etc. a tutorialesjava_@RROBA_codexion.com.
Si desea ayudar a mantener en funcionamiento esta web, colaborar con la traducción de estos documentos o necesita que se traduzca algĂșn capĂ­tulo en concreto puede realizar una donación directa mediante Paypal:
Detecting Text Boundaries (The Java™ Tutorials > Internationalization > Working with Text)
Trail: Internationalization
Lesson: Working with Text
Detecting Text Boundaries
Home Page > Internationalization > Working with Text
Detecting Text Boundaries
Applications that manipulate text need to locate boundaries within the text. For example, consider some of the common functions of a word processor: highlighting a character, cutting a word, moving the cursor to the next sentence, and wrapping a word at a line ending. To perform each of these functions, the word processor must be able to detect the logical boundaries in the text. Fortunately you don't have to write your own routines to perform boundary analysis. Instead, you can take advantage of the methods provided by the BreakIterator class.

About the BreakIterator Class

This section discusses the instantiation methods and the imaginary cursor of the BreakIterator class.

Character Boundaries

In this section you'll learn about the difference between user and Unicode characters, and how to locate user characters with a BreakIterator.

Word Boundaries

If your application needs to select or locate words within text, you'll find it helpful to use a BreakIterator.

Sentence Boundaries

Determining sentence boundaries can be problematic, because of the ambiguous use of sentence terminators in many written languages. This section examines some of the problems you may encounter, and how the BreakIterator deals with them.

Line Boundaries

This section describes how to locate potential line breaks in a text string with a BreakIterator.
Previous page: Improving Collation Performance
Next page: About the BreakIterator Class