package
0.4.9
Repository: https://github.com/playerr9/mygolib.git
Documentation: pkg.go.dev

# Functions

CalculateNumberOfLines is a function that calculates the minimum number of lines needed to fit a given text within a specified width.
FirstInstanceOfWS finds the first instance of whitespace in the characters.
FitString fits a string to the specified width by adding spaces to the end of the string until the width is reached.
GenerateID generates a random ID of the specified size (in bytes).
LastInstanceOfWS finds the last instance of whitespace in the characters.
NewErrLinesGreaterThanWords is a constructor of ErrLinesGreaterThanWords.
NewErrLongerSuffix is a constructor of ErrLongerSuffix.
NewErrNoCandidateFound is a constructor of ErrNoCandidateFound.
NewTextSplit creates a new TextSplit with the given maximum width and height.
ReplaceSuffix replaces the end of the given string with the provided suffix.
SplitInEqualSizedLines is a function that splits a given text into lines of equal width.
Title capitalizes the first letter of the input string and returns the modified string.

# Structs

ErrLinesGreaterThanWords is an error type that is returned when the number of lines in a text is greater than the number of words.
ErrLongerSuffix is a struct that represents an error when the suffix is longer than the string.
ErrNoCandidateFound is an error type that is returned when no candidate is found.
TextSplit represents a split text with a maximum width and height.