authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-28 23:10:50 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-28 23:10:50 -07:00
logd4a53bcac5b87abecc65491109ec22aaf5f3dc2f
treedbaa6994ff72d2fb4a40576b356a89e61adc0194
parent8ffadb65efdb424c6fe07a804107a775d55ebfe5

add Bold, Italic, Underline helper functions


1 files changed, 12 insertions(+), 0 deletions(-)

src/lib.zig+12
......@@ -187,9 +187,21 @@ pub const color = struct {
187187 return csi.SGR(.{40 + @enumToInt(s)}) ++ m ++ style.ResetBgColor;
188188 }
189189
190 pub fn Bold(comptime m: []const u8) []const u8 {
191 return style.Bold ++ m ++ style.ResetIntensity;
192 }
193
190194 pub fn Faint(comptime m: []const u8) []const u8 {
191195 return style.Faint ++ m ++ style.ResetIntensity;
192196 }
197
198 pub fn Italic(comptime m: []const u8) []const u8 {
199 return style.Italic ++ m ++ style.ResetItalic;
200 }
201
202 pub fn Underline(comptime m: []const u8) []const u8 {
203 return style.Underline ++ m ++ style.ResetUnderline;
204 }
193205};
194206
195207//