Install
legion pkg install legion-fmt
legion-fmt
String formatting and pretty-print utilities for legionhjyu.
Install
legion pkg install legion-fmt
Usage
summon "legion-fmt" release fmtfmt.printf("Hello, %s! You have %d messages.\n", name, count)
fmt.table(headers, rows)
fmt.red("Error: something went wrong")
fmt.green("Success!")
Functions
| Function | Description |
|---|---|
fmt.printf(tmpl, ...args) | Printf-style formatted print |
fmt.sprintf(tmpl, ...args) | Returns formatted string |
fmt.table(headers, rows) | Prints aligned ASCII table |
fmt.red(msg) | Red terminal output |
fmt.green(msg) | Green terminal output |
fmt.yellow(msg) | Yellow terminal output |
fmt.blue(msg) | Blue terminal output |
fmt.bold(msg) | Bold terminal output |