MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / AnsiClass

Method AnsiClass

internal/scripting/scripting.go:45–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func (t *TextWrapperStyle) AnsiClass() string {
46 if t.cache != `` {
47 return t.cache
48 }
49
50 if t.Fg != `` {
51 t.cache += ` fg="` + t.Fg + `"`
52 }
53
54 if t.Bg != `` {
55 t.cache += ` bg="` + t.Bg + `"`
56 }
57
58 return t.cache
59}
60
61func (t *TextWrapperStyle) Wrap(str string) string {
62 if !t.Empty() {

Callers 1

WrapMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected