diff --git a/README.md b/README.md index f731bfd..ddd3f29 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ An easier way to print colored text to the terminal. ```v import color -color.red.cprintln('Hello World') -color.cyan.cprintln_bg('Hello World') -color.bold.cprintln('Hello World') +color.red.println('Hello World') +color.cyan.println_bg('Hello World') +color.bold.println('Hello World') ``` ## Advanced @@ -25,5 +25,5 @@ brush := color.new_brush( style: [color.bold, color.underline, color.italic] )! -brush.cprintln('Hello World') +brush.println('Hello World') ``` diff --git a/color/color.v b/color/color.v index fa06831..1746a90 100644 --- a/color/color.v +++ b/color/color.v @@ -9,11 +9,11 @@ pub interface Color { render_bg(string) string } -pub fn (c Color) cprint_bg(msg string) { +pub fn (c Color) print_bg(msg string) { print(c.render_bg(msg)) } -pub fn (c Color) cprintln_bg(msg string) { +pub fn (c Color) println_bg(msg string) { println(c.render_bg(msg)) } diff --git a/color/style.v b/color/style.v index fb57e59..4c20498 100644 --- a/color/style.v +++ b/color/style.v @@ -8,11 +8,11 @@ pub interface Style { render(string) string } -pub fn (s Style) cprint(msg string) { +pub fn (s Style) print(msg string) { print(s.render(msg)) } -pub fn (s Style) cprintln(msg string) { +pub fn (s Style) println(msg string) { println(s.render(msg)) } diff --git a/test.v b/test.v index a2e3ebb..43c5f28 100644 --- a/test.v +++ b/test.v @@ -3,9 +3,9 @@ module main import color fn main() { - color.red.cprintln('Hello World') - color.black.cprintln_bg('Hello World') - color.bold.cprintln('Hello World') + color.red.println('Hello World') + color.black.println_bg('Hello World') + color.bold.println('Hello World') brush := color.new_brush( fg: color.rgb(0, 0, 0) @@ -13,5 +13,5 @@ fn main() { styles: [color.bold, color.dim, color.italic] )! - brush.cprintln('Hello World') + brush.println('Hello World') }