Class

Hyphens

Automatically hyphenates words when wrapping text.

Source set: Common
public class Hyphens internal constructor(public val value: Int)

Automatically hyphenates words when wrapping text.

Inserts hyphens at syllable boundaries based on language rules.

Suggest manual line break opportunities using:

    word wraps at this point.

  • Soft hyphen (\u00AD): Marks a wrapping opportunity. The hyphen is only visible if the
  • Hard hyphen (\u2010): Inserts a permanently visible hyphen that also allows wrapping.

Default is Hyphens.None (no automatic hyphenation).

Members

Companion

Source set: Common
public companion object

Properties

None

Source set: Common
public val None: Hyphens

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 | +---------+

Auto

Source set: Common
public val Auto: Hyphens

Breaks words automatically at syllable boundaries.

Manual suggestions (like soft hyphens) override automatic breaks.

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

Unspecified

Source set: Common
public val Unspecified: Hyphens

Represents an unset Hyphens value.

Functions

valueOf

Source set: Common
public fun valueOf(value: Int): Hyphens

Creates Hyphens from value.

Useful for serialization/deserialization.

Parameters

value internal integer representation.

Throws: IllegalArgumentException

if value is invalid.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: