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

ci: fix v build-examples

This commit is contained in:
Delyan Angelov
2022-04-15 20:31:10 +03:00
parent e18cb9748f
commit 6f5a513d8b
8 changed files with 16 additions and 17 deletions

View File

@ -84,7 +84,7 @@ fn (_ None__) str() string {
}
pub struct Option {
state byte
state u8
err IError = none__
}

View File

@ -133,7 +133,7 @@ pub fn (x int_literal) hex() string {
return res
}
pub fn (x byte) hex() string {
pub fn (x u8) hex() string {
res := ''
#res.str = x.val.toString(16)
@ -172,7 +172,7 @@ pub fn (i i64) hex2() string {
return '0x' + i.hex()
}
pub fn (i byte) hex2() string {
pub fn (i u8) hex2() string {
return '0x' + i.hex()
}

View File

@ -28,7 +28,7 @@ pub fn (s string) after(dot string) string {
return string(s.str.slice(JS.Number(int(s.str.lastIndexOf(dot.str)) + 1), s.str.length))
}
pub fn (s string) after_char(dot byte) string {
pub fn (s string) after_char(dot u8) string {
// TODO: Implement after byte
return s
}
@ -385,7 +385,7 @@ fn compare_lower_strings(a &string, b &string) int {
// at returns the byte at index `idx`.
// Example: assert 'ABC'.at(1) == u8(`B`)
fn (s string) at(idx int) byte {
fn (s string) at(idx int) u8 {
mut result := u8(0)
#result = new u8(s.str.charCodeAt(result))
@ -491,7 +491,7 @@ pub fn (s string) strip_margin() string {
// strip_margin_custom does the same as `strip_margin` but will use `del` as delimiter instead of `|`
[direct_array_access]
pub fn (s string) strip_margin_custom(del byte) string {
pub fn (s string) strip_margin_custom(del u8) string {
mut sep := del
if sep.is_space() {
eprintln('Warning: `strip_margin` cannot use white-space as a delimiter')

View File

@ -12,6 +12,6 @@ pub fn utf8_str_len(s string) int {
return s.len
}
pub fn utf8_char_len(b byte) int {
pub fn utf8_char_len(b u8) int {
return ((0xe5000000 >> ((b >> 3) & 0x1e)) & 3) + 1
}