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

all: s.contains(s2) instead of in

This commit is contained in:
Alexander Medvednikov
2021-03-23 11:38:56 +03:00
parent b5c286256c
commit 0c055a1ce9
7 changed files with 13 additions and 14 deletions

View File

@ -882,7 +882,7 @@ pub fn (s string) contains(substr string) bool {
// contains_any returns `true` if the string contains any chars in `chars`.
pub fn (s string) contains_any(chars string) bool {
for c in chars {
if c.ascii_str() in s {
if s.contains(c.ascii_str()) {
return true
}
}