---
title: "Hyphens"
description: "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:
- <code>\u2010</code> (\"hard\" hyphen) Indicates a visible line break opportunity. Even if the line is not actually broken at that point, the hyphen is still rendered.
- <code>\u00AD</code> (\"soft\" hyphen) This character is not rendered visibly; instead, it marks a place where the word can be broken if hyphenation is necessary.

The default configuration for [Hyphens] = [Hyphens.None]"
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
value class Hyphens internal constructor(val value: Int)
```


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:
- <code>\u2010</code> ("hard" hyphen) Indicates a visible line break opportunity. Even if the line is not actually broken at that point, the hyphen is still rendered.
- <code>\u00AD</code> ("soft" hyphen) This character is not rendered visibly; instead, it marks a place where the word can be broken if hyphenation is necessary.

The default configuration for `Hyphens` = `Hyphens.None`


## Companion Object

#### Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val None = Hyphens(1)
```


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.
<pre>
+---------+
| Experim |
| ental   |
+---------+
</pre>



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Auto = Hyphens(2)
```


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.
<pre>
+---------+
| Experi- |
| mental  |
+---------+
</pre>



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Unspecified = Hyphens(0)
```


This represents an unset value, a usual replacement for "null" when a primitive value is
desired.



#### Methods

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun valueOf(value: Int): Hyphens
```


Creates a Hyphens from the given integer value. This can be useful if you need to
serialize/deserialize Hyphens values.

#### Parameters

| | |
| --- | --- |
| value | The integer representation of the Hyphens. |






