Text.style: def of bend-kit-tty@0.1.0.1 Import: import bend-kit-tty@0.1.0.1/text.bend as Text Lines 6-12 of bend-kit-tty@0.1.0.1/text.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-tty@0.1.0.1/text.bend&start_line=6&end_line=12 import Base # Wrap text in one numeric SGR code and a reset when enabled; otherwise return it unchanged. def style(enabled: Bool, code: U32, text: String) -> String: match enabled: case True{}: String.concat(["\u{1B}[", U32.show(code), "m", text, "\u{1B}[0m"]) case False{}: text Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.concat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show