1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

term: add term.slow_blink/1 and term.rapid_blink/1 (#16470)

This commit is contained in:
RGBCube 2022-11-18 20:03:14 +03:00 committed by GitHub
parent 92be90300c
commit 2d9808b2dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,17 @@ pub fn underline(msg string) string {
return format(msg, '4', '24')
}
// slow_blink will surround the `msg` with ANSI escape codes for blinking (less than 150 times per minute).
pub fn slow_blink(msg string) string {
return format(msg, '5', '25')
}
// rapid_blink will surround the `msg` with ANSI escape codes for blinking (over 150 times per minute).
// Note that unlike slow_blink, this is not very widely supported.
pub fn rapid_blink(msg string) string {
return format(msg, '6', '26')
}
pub fn inverse(msg string) string {
return format(msg, '7', '27')
}