Unmarshalf is the same as Unmarshal but with formatting
(codeChar rune, format string, v ...any)
| 79 | |
| 80 | // Unmarshalf is the same as Unmarshal but with formatting |
| 81 | func Unmarshalf(codeChar rune, format string, v ...any) TextComponent { |
| 82 | return Unmarshal(fmt.Sprintf(format, v...), codeChar) |
| 83 | } |
| 84 | |
| 85 | // Unmarshal parses the text and color codes into a text component. The codeChar argument is what's used for color codes (i.e &) |
| 86 | func Unmarshal(text string, codeChar rune) TextComponent { |