mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: fix in for various numeric types (#6311)
This commit is contained in:
@@ -393,6 +393,16 @@ pub fn (a []byte) contains(val byte) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// TODO generic
|
||||
pub fn (a []u16) contains(val u16) bool {
|
||||
for aa in a {
|
||||
if aa == val {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// TODO generic
|
||||
fn (ar []int) contains(val int) bool {
|
||||
for s in ar {
|
||||
|
||||
Reference in New Issue
Block a user