---
name: "PS_hyphenate"
section: "3"
platform: "linux"
package: "pslib-dev"
version: "0.4.8-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PS_hyphenate"
---

# PS\_hyphenate(3)

Hyphenates a word

## NAME

PS\_hyphenate — Hyphenates a word

## SYNOPSIS

\#include \<pslib.h\>

int PS\_hyphenate(PSDoc \*psdoc, const char \*text, char \*\*hyphens)

## DESCRIPTION

Hyphenates the passed word. **text** should not  contain any non alpha characters. Possible positions for breaks are  returned in **hyphens**.

This function requires the locale category LC\_CTYPE to be set  propperly. PS\_boot() usually does it by using the enviroment variables.

PS\_hyphenate() evaluates the value 'hyphenminchars' and the parameter  \`hyphendict'. hyphendict must be set before calling this function.

## RETURN VALUE

Returns -1 in case of an error, and otherwise 0.

## SEE ALSO

[PS\_boot(3)](/PS_boot/3.md), [PS\_show\_boxed(3)](/PS_show_boxed/3.md), [locale(1)](/locale/1.md)

## AUTHOR

This manual page was written by Uwe Steinmann \<uwe@steinmann.cx\>.
