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

all: byte => u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 14:45:52 +03:00
parent 7f3b91e688
commit 014c3c97f0
38 changed files with 201 additions and 201 deletions

View File

@ -6,5 +6,5 @@ mut:
c_oflag int
c_cflag int
c_lflag int
c_cc [20]byte
c_cc [20]u8
}

View File

@ -85,7 +85,7 @@ pub fn strip_ansi(text string) string {
// This is a port of https://github.com/kilobyte/colorized-logs/blob/master/ansi2txt.c
// \e, [, 1, m, a, b, c, \e, [, 2, 2, m => abc
mut input := textscanner.new(text)
mut output := []byte{cap: text.len}
mut output := []u8{cap: text.len}
mut ch := 0
for ch != -1 {
ch = input.next()
@ -117,7 +117,7 @@ pub fn strip_ansi(text string) string {
ch = input.next()
}
} else if ch != -1 {
output << byte(ch)
output << u8(ch)
}
}
return output.bytestr()

View File

@ -6,5 +6,5 @@ mut:
c_oflag int
c_cflag int
c_lflag int
c_cc [20]byte
c_cc [20]u8
}