{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

Hyphens


Automatic hyphenation configuration.

Hyphenation is a dash-like punctuation mark used to join two-words into one or separate syl-lab-les of a word.

Automatic hyphenation is added between syllables at appropriate hyphenation points, following language rules.

However, user can override automatic break point selection, suggesting line break opportunities (see Suggesting line break opportunities below).

Suggesting line break opportunities:

The default configuration for Hyphens = Hyphens.None

Summary

Public companion properties

Hyphens

The words will be automatically broken at appropriate hyphenation points.

Cmn
Hyphens

Lines will break with no hyphenation.

Cmn

Public functions

open String
Cmn

Public companion properties

Auto

val AutoHyphens

The words will be automatically broken at appropriate hyphenation points.

However, suggested line break opportunities (see Suggesting line break opportunities above) will override automatic break point selection when present.

+---------+
| Experi- |
| mental  |
+---------+

None

val NoneHyphens

Lines will break with no hyphenation.

"Hard" hyphens will still be respected. However, no automatic hyphenation will be attempted. If a word must be broken due to being longer than a line, it will break at any character and will not attempt to break at a syllable boundary.

+---------+
| Experim |
| ental   |
+---------+

Public functions

toString

open fun toString(): String