mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: vfmt every .v file, except vlib/builtin/int_test.v (#9448)
This commit is contained in:
@ -14,7 +14,6 @@ pub fn (s string) after(dot string) string {
|
||||
return string(s.str.slice(s.str.lastIndexOf(dot.str) + 1, int(s.str.length)))
|
||||
}
|
||||
|
||||
|
||||
pub fn (s string) after_char(dot byte) string {
|
||||
// TODO: Implement after byte
|
||||
return s
|
||||
@ -97,7 +96,7 @@ pub fn (s string) starts_with(p string) bool {
|
||||
}
|
||||
|
||||
pub fn (s string) fields() []string {
|
||||
return []// s.str.split()
|
||||
return [] // s.str.split()
|
||||
}
|
||||
|
||||
pub fn (s string) find_between(start string, end string) string {
|
||||
@ -105,9 +104,9 @@ pub fn (s string) find_between(start string, end string) string {
|
||||
}
|
||||
|
||||
// unnecessary in the JS backend, implemented for api parity.
|
||||
pub fn (s string) free () {}
|
||||
pub fn (s string) free() {}
|
||||
|
||||
pub fn (s string) hash () int {
|
||||
pub fn (s string) hash() int {
|
||||
mut h := u32(0)
|
||||
if h == 0 && s.len > 0 {
|
||||
for c in s {
|
||||
@ -161,4 +160,4 @@ pub fn (s string) u32() u32 {
|
||||
// u64 returns the value of the string as u64 `'1'.u64() == u64(1)`.
|
||||
pub fn (s string) u64() u64 {
|
||||
return u64(JS.parseInt(s))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user