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

array: make ".contains()" private, use "in" everywhere

This commit is contained in:
Alexander Medvednikov
2019-09-11 15:07:18 +03:00
parent 63f2f2b294
commit 9853323157
5 changed files with 35 additions and 31 deletions

View File

@@ -529,7 +529,7 @@ pub fn (s string) find_between(start, end string) string {
}
// TODO generic
pub fn (ar []string) contains(val string) bool {
fn (ar []string) contains(val string) bool {
for s in ar {
if s == val {
return true
@@ -539,7 +539,7 @@ pub fn (ar []string) contains(val string) bool {
}
// TODO generic
pub fn (ar []int) contains(val int) bool {
fn (ar []int) contains(val int) bool {
for i, s in ar {
if s == val {
return true