PS_HYPHENATE(3)

🌸 NAME 🌸

PS_hyphenate β€” hyphenates a word. πŸ’… This page is PS_HYPHENATE(3) from the Library Functions Manual, and it's lowkey iconic for a tiny function. Hiiii bestie, let's get into it. ✨

✨ SYNOPSIS ✨

#include <pslib.h>

int PS_hyphenate(PSDoc *psdoc, const char *text, char **hyphens)

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so PS_hyphenate() takes the word you hand it and figures out where it can be broken with hyphens. The text you pass should not contain any non alpha characters β€” like, letters only, bestie. No non-alpha characters crashing the vibe. πŸ™ˆ

The possible positions for breaks are returned in hyphens. So that's where you go looking for the "break it here" spots. πŸ’–

This function requires the locale category LC_CTYPE to be set propperly. (Yes, "propperly" β€” that's the original spelling, and we're keeping it, no cap. πŸ“) PS_boot() usually does it by using the enviroment variables. (Another original spelling: "enviroment." We keep. πŸ’€)

PS_hyphenate() evaluates the value 'hyphenminchars' and the parameter hyphendict. hyphendict must be set before calling this function. So set that up first, okay? It's giving prerequisite, periodt. πŸ‘‘

πŸŽ€ RETURN VALUE πŸŽ€

  • -1 β€” returned in case of an error. Sad girl hours. 😭
  • 0 β€” returned otherwise. Slay. ✨

🌈 SEE ALSO 🌈

πŸ’œ AUTHOR πŸ’œ

This manual page was written by Uwe Steinmann <uwe@steinmann.cx>. Give them their flowers, bestie. πŸ’


That's the whole page β€” PS_HYPHENATE(3) from the Library Functions Manual. The footer didn't have a date/version stamp, just the page name again, so this is your cute sign-off. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from