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

Method Wrap

internal/scripting/scripting.go:61–73  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

59}
60
61func (t *TextWrapperStyle) Wrap(str string) string {
62 if !t.Empty() {
63
64 if t.ColorPattern != `` {
65 str = colorpatterns.ApplyColorPattern(str, t.ColorPattern, t.colorPatternStyle)
66 }
67
68 if ac := t.AnsiClass(); ac != `` {
69 str = `<ansi ` + t.AnsiClass() + `>` + str + `</ansi>`
70 }
71 }
72 return str
73}
74
75var (
76 errNoScript = errors.New("no script")

Callers 13

LoadGameTimeConfigsFunction · 0.80
saveGameTimeFileFunction · 0.80
LoadAudioConfigFunction · 0.80
SendUserMessageFunction · 0.80
SendRoomMessageFunction · 0.80
SendRoomExitsMessageFunction · 0.80
SendBroadcastFunction · 0.80
SendTextMethod · 0.80
SendTextToExitsMethod · 0.80
SendTextMethod · 0.80
LoadColorPatternsFunction · 0.80
LoadFlatFileFunction · 0.80

Calls 3

EmptyMethod · 0.95
AnsiClassMethod · 0.95
ApplyColorPatternFunction · 0.92

Tested by

no test coverage detected