1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
This commit is contained in:
Alexander Medvednikov
2019-12-20 00:29:37 +03:00
parent b6fe2ebc0b
commit 6210984c97
54 changed files with 1757 additions and 1993 deletions

View File

@@ -1,7 +1,6 @@
// Copyright (c) 2019 Alexander Medvednikov. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
module term
pub fn format(msg, open, close string) string {
@@ -21,19 +20,11 @@ pub fn bg_rgb(r, g, b int, msg string) string {
}
pub fn hex(hex int, msg string) string {
return format_rgb(
hex >> 16,
hex >> 8 & 0xFF,
hex & 0xFF,
msg, '38', '39')
return format_rgb(hex>>16, hex>>8 & 0xFF, hex & 0xFF, msg, '38', '39')
}
pub fn bg_hex(hex int, msg string) string {
return format_rgb(
hex >> 16,
hex >> 8 & 0xFF,
hex & 0xFF,
msg, '48', '49')
return format_rgb(hex>>16, hex>>8 & 0xFF, hex & 0xFF, msg, '48', '49')
}
pub fn bg_black(msg string) string {
@@ -199,3 +190,4 @@ pub fn yellow(msg string) string {
pub fn bright_yellow(msg string) string {
return format(msg, '93', '39')
}