Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Truncate ¶
Truncate truncates a string to the specified maximum length. If the string is longer than maxLen, it's truncated and "..." is appended. If maxLen is 0, returns "..." for non-empty strings, empty string for empty strings. If maxLen is negative, the original string is returned.
func TruncateWithSuffix ¶
TruncateWithSuffix truncates a string to the specified maximum length with a custom suffix. If the string is longer than maxLen, it's truncated and suffix is appended. If maxLen is 0 or negative, the original string is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.