Versions in this module Expand all Collapse all v0 v0.1.6 Sep 12, 2024 v0.1.5 Sep 11, 2024 Changes in this version + var NoCandidateFound error + func CalculateNumberOfLines(text []string, width int) (int, error) + func FirstInstanceOfWS(chars []rune, from_idx, to_idx int) int + func FitString(s string, width int) string + func GenerateID(size int) (string, error) + func LastInstanceOfWS(chars []rune, from_idx, to_idx int) int + func ReplaceSuffix(str, suffix string) (string, bool) + func Title(str string) (string, error) + type ErrLinesGreaterThanWords struct + NumberOfLines int + NumberOfWords int + func NewErrLinesGreaterThanWords(numberOfLines, numberOfWords int) *ErrLinesGreaterThanWords + func (e ErrLinesGreaterThanWords) Error() string + type ErrLongerSuffix struct + Str string + Suffix string + func NewErrLongerSuffix(str, suffix string) *ErrLongerSuffix + func (e ErrLongerSuffix) Error() string + type TextSplit struct + func NewTextSplit(max_width, max_height int) (*TextSplit, error) + func SplitInEqualSizedLines(text []string, width, height int) (*TextSplit, error) + func (ts *TextSplit) InsertWord(word string) bool + func (ts *TextSplit) InsertWords(words []string) int + func (ts TextSplit) Copy() *TextSplit + func (ts TextSplit) FirstLine() []string + func (ts TextSplit) FurthestRightEdge() (int, bool) + func (ts TextSplit) Height() int + func (ts TextSplit) Lines() []string + func (ts TextSplit) Runes() [][]rune