About the BreakIterator Class (getLineInstance( ) Function )

A

Abhishek

Hello,

has anyone used the breakiterator class and specifically the
LineInstance function in java?
Is it possible to specify any delimiters for the LineInstance function
while it tries to break entities into lines?

it breaks words like P-2345 into P- and 2345 as two separate line
entities. Is it possible for us to specify that it is a single entity?
Thanks

Abhishek S
 
S

Stefan Ram

Supersedes: <[email protected]>

Abhishek said:
it breaks words like P-2345 into P- and 2345 as two separate line
entities. Is it possible for us to specify that it is a single entity?

Superseding my previous answer:

I am not sure about this.

There seems to be the possibility to install a custom
java.text.spi.BreakIteratorProvider, or a custom
java.util.spi.LocaleServiceProvider.

One of them possibly can be specified to regard »-« to be
an in-word character.

However, I have never done this and I don't know the
details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top