builtin: fix the string.index_any method (#11310)

This commit is contained in:
Lathanao 2021-09-06 19:06:37 +07:00 committed by GitHub
parent 6084c0fc54
commit 78c26e69cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View file

@ -910,3 +910,9 @@ fn test_string_to_rune() {
x := 'Hello World 👋'
assert x.runes().len == 13
}
fn test_index_any() {
x := 'abcdefghij'
assert x.index_any('ef') == 4
assert x.index_any('fe') == 4
}