Documentation ¶
Index ¶
- Constants
- func ColStringSliceFromStringSlice(texts []string, color string) []*tbuikit.ColorizedString
- func Create(text, color string) *tbuikit.ColorizedString
- func IsWhoMessage(colorizedString *tbuikit.ColorizedString) bool
- func Pack(colorizedString *tbuikit.ColorizedString) string
- func Unpack(raw string) *tbuikit.ColorizedString
- type ColorList
Constants ¶
View Source
const MESSAGE_TOKEN string = "|%|"
Separator string to split the message up
View Source
const WHO_MESSAGE_REGEX_STR string = `^\|%WHO%\|`
View Source
const WHO_MESSAGE_TOKEN string = "|%WHO%|"
Variables ¶
This section is empty.
Functions ¶
func ColStringSliceFromStringSlice ¶
func ColStringSliceFromStringSlice(texts []string, color string) []*tbuikit.ColorizedString
For convenience, takes a slice of strings and a single color and then converts them to slice of message objects. Obviously, they'll all have the same color but in many cases this is desirable.
func Create ¶
func Create(text, color string) *tbuikit.ColorizedString
Creates a new colorized string object, from a body string and color string
func IsWhoMessage ¶
func IsWhoMessage(colorizedString *tbuikit.ColorizedString) bool
Check if this message from the server is a "who" message
func Pack ¶
func Pack(colorizedString *tbuikit.ColorizedString) string
Converts a colorized string object to a string
func Unpack ¶
func Unpack(raw string) *tbuikit.ColorizedString
Converts a string to a ColorizedString object
Types ¶
Click to show internal directories.
Click to hide internal directories.